From 0d3f52f74245d6ee1e20e5a6b8453000108b6543 Mon Sep 17 00:00:00 2001 From: Vladimir Varankin Date: Fri, 18 Oct 2024 14:16:15 +0200 Subject: [PATCH] helm: fix broken topology spread constraints in metamonitoring's GrafanaAgent (#9669) * helm: fix indentation in metamonitoring's topologySpreadConstraints Signed-off-by: Vladimir Varankin * rebuild assets Signed-off-by: Vladimir Varankin * update CHANGELOG Signed-off-by: Vladimir Varankin --------- Signed-off-by: Vladimir Varankin --- .../helm/charts/mimir-distributed/CHANGELOG.md | 1 + .../metamonitoring/grafana-agent.yaml | 2 +- .../metamonitoring/grafana-agent.yaml | 18 +++++++++--------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/operations/helm/charts/mimir-distributed/CHANGELOG.md b/operations/helm/charts/mimir-distributed/CHANGELOG.md index c03058bc37f..fde50944a93 100644 --- a/operations/helm/charts/mimir-distributed/CHANGELOG.md +++ b/operations/helm/charts/mimir-distributed/CHANGELOG.md @@ -30,6 +30,7 @@ Entries should include a reference to the Pull Request that introduced the chang ## main / unreleased * [ENHANCEMENT] Add support for setting type and internal traffic policy for Kubernetes service. Set `internalTrafficPolicy=Cluster` by default in all services with type `ClusterIP`. #9619 +* [BUGFIX] Fix incorrect use of topology spread constraints in `GrafanaAgent` CRD of metamonitoring. #9669 ## 5.5.0 diff --git a/operations/helm/charts/mimir-distributed/templates/metamonitoring/grafana-agent.yaml b/operations/helm/charts/mimir-distributed/templates/metamonitoring/grafana-agent.yaml index f8fa89323e8..d75306d1241 100644 --- a/operations/helm/charts/mimir-distributed/templates/metamonitoring/grafana-agent.yaml +++ b/operations/helm/charts/mimir-distributed/templates/metamonitoring/grafana-agent.yaml @@ -64,7 +64,7 @@ spec: tolerations: {{- toYaml . | nindent 4 }} {{- end }} - {{- include "mimir.lib.topologySpreadConstraints" (dict "ctx" $ "component" "meta-monitoring") | nindent 6 }} + {{- include "mimir.lib.topologySpreadConstraints" (dict "ctx" $ "component" "meta-monitoring") | nindent 2 }} logs: instanceSelector: matchLabels: diff --git a/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/templates/metamonitoring/grafana-agent.yaml b/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/templates/metamonitoring/grafana-agent.yaml index bdd220e922e..de87e8e1bf5 100644 --- a/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/templates/metamonitoring/grafana-agent.yaml +++ b/operations/helm/tests/metamonitoring-values-generated/mimir-distributed/templates/metamonitoring/grafana-agent.yaml @@ -16,15 +16,15 @@ spec: # The container specs here are merged with the ones in the operator using a strategic merge patch. - name: config-reloader - name: grafana-agent - topologySpreadConstraints: - - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: ScheduleAnyway - labelSelector: - matchLabels: - app.kubernetes.io/name: mimir - app.kubernetes.io/instance: metamonitoring-values - app.kubernetes.io/component: meta-monitoring + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: metamonitoring-values + app.kubernetes.io/component: meta-monitoring logs: instanceSelector: matchLabels: