From 775aef4ed35e63179398c98cc1302ea5d527c51d Mon Sep 17 00:00:00 2001 From: Niclas Schad Date: Mon, 18 Dec 2023 21:01:22 +0100 Subject: [PATCH] fix podTargetLabels in all Prometheus ServiceMonitor CRDs (#487) * fix podTargetLabels in all Prometheus ServiceMonitor CRD's Signed-off-by: Niclas Schad * add pr number Signed-off-by: Niclas Schad --------- Signed-off-by: Niclas Schad --- CHANGELOG.md | 1 + templates/alertmanager/alertmanager-servicemonitor.yaml | 4 ++-- templates/compactor/compactor-servicemonitor.yaml | 4 ++-- templates/distributor/distributor-servicemonitor.yaml | 4 ++-- templates/ingester/ingester-servicemonitor.yaml | 4 ++-- .../overrides-exporter/overrides-exporter-servicemonitor.yaml | 4 ++-- templates/querier/querier-servicemonitor.yaml | 4 ++-- templates/query-frontend/query-frontend-servicemonitor.yaml | 4 ++-- templates/query-scheduler/query-scheduler-servicemonitor.yaml | 4 ++-- templates/ruler/ruler-servicemonitor.yaml | 4 ++-- templates/store-gateway/store-gateway-servicemonitor.yaml | 4 ++-- 11 files changed, 21 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32d99ece..7a839c4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ * [DEPENDENCY] Update quay.io/cortexproject/cortex Docker tag to v1.15.2 #459 * [DEPENDENCY] Update quay.io/cortexproject/cortex Docker tag to v1.15.3 #471 * [BUGFIX] Correctly interpret .Capabilities.KubeVersion when it looks like a prerelease #457 +* [BUGFIX] Fix podTargetLabels in all Prometheus ServiceMonitor CRDs #487 ## 2.1.0 / 2023-03-17 diff --git a/templates/alertmanager/alertmanager-servicemonitor.yaml b/templates/alertmanager/alertmanager-servicemonitor.yaml index 39f265ac..46f4cbe2 100644 --- a/templates/alertmanager/alertmanager-servicemonitor.yaml +++ b/templates/alertmanager/alertmanager-servicemonitor.yaml @@ -20,9 +20,9 @@ spec: namespaceSelector: matchNames: - {{ .Release.Namespace | quote }} - {{- if .Values.purger.serviceMonitor.podTargetLabels }} + {{- if .Values.alertmanager.serviceMonitor.podTargetLabels }} podTargetLabels: - {{- range .Values.purger.serviceMonitor.podTargetLabels }} + {{- range .Values.alertmanager.serviceMonitor.podTargetLabels }} - {{ . }} {{- end }} {{- end }} diff --git a/templates/compactor/compactor-servicemonitor.yaml b/templates/compactor/compactor-servicemonitor.yaml index b8c38655..58365762 100644 --- a/templates/compactor/compactor-servicemonitor.yaml +++ b/templates/compactor/compactor-servicemonitor.yaml @@ -20,9 +20,9 @@ spec: namespaceSelector: matchNames: - {{ .Release.Namespace | quote }} - {{- if .Values.purger.serviceMonitor.podTargetLabels }} + {{- if .Values.compactor.serviceMonitor.podTargetLabels }} podTargetLabels: - {{- range .Values.purger.serviceMonitor.podTargetLabels }} + {{- range .Values.compactor.serviceMonitor.podTargetLabels }} - {{ . }} {{- end }} {{- end }} diff --git a/templates/distributor/distributor-servicemonitor.yaml b/templates/distributor/distributor-servicemonitor.yaml index a4f0f4c7..67facb7a 100644 --- a/templates/distributor/distributor-servicemonitor.yaml +++ b/templates/distributor/distributor-servicemonitor.yaml @@ -20,9 +20,9 @@ spec: namespaceSelector: matchNames: - {{ .Release.Namespace | quote }} - {{- if .Values.purger.serviceMonitor.podTargetLabels }} + {{- if .Values.distributor.serviceMonitor.podTargetLabels }} podTargetLabels: - {{- range .Values.purger.serviceMonitor.podTargetLabels }} + {{- range .Values.distributor.serviceMonitor.podTargetLabels }} - {{ . }} {{- end }} {{- end }} diff --git a/templates/ingester/ingester-servicemonitor.yaml b/templates/ingester/ingester-servicemonitor.yaml index 6429ff08..201ad606 100644 --- a/templates/ingester/ingester-servicemonitor.yaml +++ b/templates/ingester/ingester-servicemonitor.yaml @@ -20,9 +20,9 @@ spec: namespaceSelector: matchNames: - {{ .Release.Namespace | quote }} - {{- if .Values.purger.serviceMonitor.podTargetLabels }} + {{- if .Values.ingester.serviceMonitor.podTargetLabels }} podTargetLabels: - {{- range .Values.purger.serviceMonitor.podTargetLabels }} + {{- range .Values.ingester.serviceMonitor.podTargetLabels }} - {{ . }} {{- end }} {{- end }} diff --git a/templates/overrides-exporter/overrides-exporter-servicemonitor.yaml b/templates/overrides-exporter/overrides-exporter-servicemonitor.yaml index c281c8ad..cbb141b7 100644 --- a/templates/overrides-exporter/overrides-exporter-servicemonitor.yaml +++ b/templates/overrides-exporter/overrides-exporter-servicemonitor.yaml @@ -20,9 +20,9 @@ spec: namespaceSelector: matchNames: - {{ .Release.Namespace | quote }} - {{- if .Values.purger.serviceMonitor.podTargetLabels }} + {{- if .Values.overrides_exporter.serviceMonitor.podTargetLabels }} podTargetLabels: - {{- range .Values.purger.serviceMonitor.podTargetLabels }} + {{- range .Values.overrides_exporter.serviceMonitor.podTargetLabels }} - {{ . }} {{- end }} {{- end }} diff --git a/templates/querier/querier-servicemonitor.yaml b/templates/querier/querier-servicemonitor.yaml index 2211a3f6..de8b0252 100644 --- a/templates/querier/querier-servicemonitor.yaml +++ b/templates/querier/querier-servicemonitor.yaml @@ -20,9 +20,9 @@ spec: namespaceSelector: matchNames: - {{ .Release.Namespace | quote }} - {{- if .Values.purger.serviceMonitor.podTargetLabels }} + {{- if .Values.querier.serviceMonitor.podTargetLabels }} podTargetLabels: - {{- range .Values.purger.serviceMonitor.podTargetLabels }} + {{- range .Values.querier.serviceMonitor.podTargetLabels }} - {{ . }} {{- end }} {{- end }} diff --git a/templates/query-frontend/query-frontend-servicemonitor.yaml b/templates/query-frontend/query-frontend-servicemonitor.yaml index 0add8f3a..9e17ac63 100644 --- a/templates/query-frontend/query-frontend-servicemonitor.yaml +++ b/templates/query-frontend/query-frontend-servicemonitor.yaml @@ -20,9 +20,9 @@ spec: namespaceSelector: matchNames: - {{ .Release.Namespace | quote }} - {{- if .Values.purger.serviceMonitor.podTargetLabels }} + {{- if .Values.query_frontend.serviceMonitor.podTargetLabels }} podTargetLabels: - {{- range .Values.purger.serviceMonitor.podTargetLabels }} + {{- range .Values.query_frontend.serviceMonitor.podTargetLabels }} - {{ . }} {{- end }} {{- end }} diff --git a/templates/query-scheduler/query-scheduler-servicemonitor.yaml b/templates/query-scheduler/query-scheduler-servicemonitor.yaml index 81c6f9e0..860a7d51 100644 --- a/templates/query-scheduler/query-scheduler-servicemonitor.yaml +++ b/templates/query-scheduler/query-scheduler-servicemonitor.yaml @@ -20,9 +20,9 @@ spec: namespaceSelector: matchNames: - {{ .Release.Namespace | quote }} - {{- if .Values.purger.serviceMonitor.podTargetLabels }} + {{- if .Values.query_scheduler.serviceMonitor.podTargetLabels }} podTargetLabels: - {{- range .Values.purger.serviceMonitor.podTargetLabels }} + {{- range .Values.query_scheduler.serviceMonitor.podTargetLabels }} - {{ . }} {{- end }} {{- end }} diff --git a/templates/ruler/ruler-servicemonitor.yaml b/templates/ruler/ruler-servicemonitor.yaml index fedaa65f..066074f7 100644 --- a/templates/ruler/ruler-servicemonitor.yaml +++ b/templates/ruler/ruler-servicemonitor.yaml @@ -20,9 +20,9 @@ spec: namespaceSelector: matchNames: - {{ .Release.Namespace | quote }} - {{- if .Values.purger.serviceMonitor.podTargetLabels }} + {{- if .Values.ruler.serviceMonitor.podTargetLabels }} podTargetLabels: - {{- range .Values.purger.serviceMonitor.podTargetLabels }} + {{- range .Values.ruler.serviceMonitor.podTargetLabels }} - {{ . }} {{- end }} {{- end }} diff --git a/templates/store-gateway/store-gateway-servicemonitor.yaml b/templates/store-gateway/store-gateway-servicemonitor.yaml index 36ca0d6b..873971de 100644 --- a/templates/store-gateway/store-gateway-servicemonitor.yaml +++ b/templates/store-gateway/store-gateway-servicemonitor.yaml @@ -20,9 +20,9 @@ spec: namespaceSelector: matchNames: - {{ .Release.Namespace | quote }} - {{- if .Values.purger.serviceMonitor.podTargetLabels }} + {{- if .Values.store_gateway.serviceMonitor.podTargetLabels }} podTargetLabels: - {{- range .Values.purger.serviceMonitor.podTargetLabels }} + {{- range .Values.store_gateway.serviceMonitor.podTargetLabels }} - {{ . }} {{- end }} {{- end }}