From 1534f83fc60281a0978d4584eb5f1ec0960ccc98 Mon Sep 17 00:00:00 2001 From: Sergey Shevchenko Date: Thu, 2 Oct 2025 11:38:49 +0300 Subject: [PATCH 1/2] Disable default namespace for serviceMonitor that can cause incorrect results Signed-off-by: Sergey Shevchenko --- .../templates/servicemonitor.yaml | 3 ++- charts/prometheus-stackdriver-exporter/values.yaml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/charts/prometheus-stackdriver-exporter/templates/servicemonitor.yaml b/charts/prometheus-stackdriver-exporter/templates/servicemonitor.yaml index 051fa875cdac..351225741098 100644 --- a/charts/prometheus-stackdriver-exporter/templates/servicemonitor.yaml +++ b/charts/prometheus-stackdriver-exporter/templates/servicemonitor.yaml @@ -4,7 +4,8 @@ kind: ServiceMonitor metadata: name: {{ template "stackdriver-exporter.fullname" . }} {{- if .Values.serviceMonitor.namespace }} - namespace: {{ .Values.serviceMonitor.namespace }} + {{- with .Values.serviceMonitor.namespace }} + namespace: {{ . }} {{- end }} labels: {{- include "stackdriver-exporter.labels" . | indent 4 }} diff --git a/charts/prometheus-stackdriver-exporter/values.yaml b/charts/prometheus-stackdriver-exporter/values.yaml index f9ebcdf2a113..447d994d2f5d 100644 --- a/charts/prometheus-stackdriver-exporter/values.yaml +++ b/charts/prometheus-stackdriver-exporter/values.yaml @@ -188,7 +188,7 @@ serviceAccount: # Enable this if you're using https://github.com/coreos/prometheus-operator serviceMonitor: enabled: false - namespace: monitoring + namespace: "" # scrapeClass scrapeClass: # additionalLabels is the set of additional labels to add to the ServiceMonitor From 3be65b279dee8d21dc8b20e7699a468d8343a507 Mon Sep 17 00:00:00 2001 From: Sergey Shevchenko Date: Thu, 2 Oct 2025 11:41:50 +0300 Subject: [PATCH 2/2] Bump chart version Signed-off-by: Sergey Shevchenko --- charts/prometheus-stackdriver-exporter/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/prometheus-stackdriver-exporter/Chart.yaml b/charts/prometheus-stackdriver-exporter/Chart.yaml index a613d4671df6..97d8b3bd35c0 100644 --- a/charts/prometheus-stackdriver-exporter/Chart.yaml +++ b/charts/prometheus-stackdriver-exporter/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: Stackdriver exporter for Prometheus name: prometheus-stackdriver-exporter -version: 4.12.0 +version: 4.13.0 appVersion: v0.18.0 home: https://www.stackdriver.com/ sources: