From 80a8e8096dddbfa5b7b264f212dadcbad011332a Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Tue, 26 Nov 2024 20:13:53 +0100 Subject: [PATCH] fix(pod,podMonitor,service): avoid error of immutable labels --- templates/prometheus-postgres-exporter/_pod.tpl | 2 +- unittests/podMonitors/podMonitorHTTP.yaml | 3 --- unittests/services/http.yaml | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/templates/prometheus-postgres-exporter/_pod.tpl b/templates/prometheus-postgres-exporter/_pod.tpl index c728c7f..f18b6cc 100644 --- a/templates/prometheus-postgres-exporter/_pod.tpl +++ b/templates/prometheus-postgres-exporter/_pod.tpl @@ -13,5 +13,5 @@ {{- end }} {{- define "prometheus-postgres-exporter.pod.selectorLabels" -}} -{{ include "prometheus-postgres-exporter.pod.labels" . }} +{{ include "prometheus-postgres-exporter.selectorLabels" . }} {{- end }} \ No newline at end of file diff --git a/unittests/podMonitors/podMonitorHTTP.yaml b/unittests/podMonitors/podMonitorHTTP.yaml index b634455..7ed6423 100644 --- a/unittests/podMonitors/podMonitorHTTP.yaml +++ b/unittests/podMonitors/podMonitorHTTP.yaml @@ -90,10 +90,7 @@ tests: path: spec.selector.matchLabels value: app.kubernetes.io/instance: prometheus-postgres-exporter-unittest - app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: prometheus-postgres-exporter - app.kubernetes.io/version: 0.1.0 - helm.sh/chart: prometheus-postgres-exporter-0.1.0 - it: Render podMonitor with custom annotations and labels. set: diff --git a/unittests/services/http.yaml b/unittests/services/http.yaml index dc9b251..2751046 100644 --- a/unittests/services/http.yaml +++ b/unittests/services/http.yaml @@ -63,10 +63,7 @@ tests: path: spec.selector value: app.kubernetes.io/instance: prometheus-postgres-exporter-unittest - app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: prometheus-postgres-exporter - app.kubernetes.io/version: 0.1.0 - helm.sh/chart: prometheus-postgres-exporter-0.1.0 - equal: path: spec.sessionAffinity value: None