From 775502fe1faf1c84e48b3c39d495921cb2960ac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Ho=C3=9F?= Date: Sat, 15 Feb 2025 10:05:19 +0100 Subject: [PATCH 1/3] [prometheus-blackbox-exporter] Add missing port names to ServiceMonitor endpoints MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since the port names are hardcoded in the service.yaml file, we can just reference them by name instead of templating their values. Signed-off-by: Sebastian Hoß --- charts/prometheus-blackbox-exporter/Chart.yaml | 2 +- .../ci/servicemonitor-values.yaml | 4 ++++ .../templates/selfservicemonitor.yaml | 5 ++--- charts/prometheus-blackbox-exporter/values.yaml | 2 -- 4 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 charts/prometheus-blackbox-exporter/ci/servicemonitor-values.yaml diff --git a/charts/prometheus-blackbox-exporter/Chart.yaml b/charts/prometheus-blackbox-exporter/Chart.yaml index 186655d2a657..99c2e51ada40 100644 --- a/charts/prometheus-blackbox-exporter/Chart.yaml +++ b/charts/prometheus-blackbox-exporter/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 description: Prometheus Blackbox Exporter name: prometheus-blackbox-exporter -version: 9.4.0 +version: 9.4.1 appVersion: v0.26.0 kubeVersion: ">=1.21.0-0" home: https://github.com/prometheus/blackbox_exporter diff --git a/charts/prometheus-blackbox-exporter/ci/servicemonitor-values.yaml b/charts/prometheus-blackbox-exporter/ci/servicemonitor-values.yaml new file mode 100644 index 000000000000..0563f0f759f7 --- /dev/null +++ b/charts/prometheus-blackbox-exporter/ci/servicemonitor-values.yaml @@ -0,0 +1,4 @@ +serviceMonitor: + selfMonitor: + enabled: true + enabled: true diff --git a/charts/prometheus-blackbox-exporter/templates/selfservicemonitor.yaml b/charts/prometheus-blackbox-exporter/templates/selfservicemonitor.yaml index 61db72dac66c..e3aad4a66e1f 100644 --- a/charts/prometheus-blackbox-exporter/templates/selfservicemonitor.yaml +++ b/charts/prometheus-blackbox-exporter/templates/selfservicemonitor.yaml @@ -16,9 +16,7 @@ spec: interval: {{ .Values.serviceMonitor.selfMonitor.interval }} scrapeTimeout: {{ .Values.serviceMonitor.selfMonitor.scrapeTimeout }} scheme: {{ .Values.serviceMonitor.selfMonitor.scheme }} - {{- with .Values.serviceMonitor.selfMonitor.port }} - port: {{ . }} - {{- end }} + port: http {{- if .Values.serviceMonitor.selfMonitor.additionalMetricsRelabels }} metricRelabelings: {{- toYaml .Values.serviceMonitor.selfMonitor.additionalMetricsRelabels | nindent 6 }} @@ -36,6 +34,7 @@ spec: interval: {{ .Values.configReloader.serviceMonitor.selfMonitor.interval }} scrapeTimeout: {{ .Values.configReloader.serviceMonitor.selfMonitor.scrapeTimeout }} scheme: {{ .Values.configReloader.serviceMonitor.selfMonitor.scheme }} + port: reloader-web {{- if .Values.configReloader.serviceMonitor.selfMonitor.tlsConfig }} tlsConfig: {{- toYaml .Values.configReloader.serviceMonitor.selfMonitor.tlsConfig | nindent 6 }} diff --git a/charts/prometheus-blackbox-exporter/values.yaml b/charts/prometheus-blackbox-exporter/values.yaml index 1ae901f93ef9..cc334c27160d 100644 --- a/charts/prometheus-blackbox-exporter/values.yaml +++ b/charts/prometheus-blackbox-exporter/values.yaml @@ -287,8 +287,6 @@ serviceMonitor: tlsConfig: {} interval: 30s scrapeTimeout: 30s - ## Port can be defined by assigning a value for the port key below - ## port: ## If true, a ServiceMonitor CRD is created for a prometheus operator ## https://github.com/coreos/prometheus-operator for each target From fb5a048eaaf9e7c5b5b8af23403ac5703c617dba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Mon, 23 Jun 2025 12:02:44 +0200 Subject: [PATCH 2/3] Update Chart.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Bauer --- charts/prometheus-blackbox-exporter/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/prometheus-blackbox-exporter/Chart.yaml b/charts/prometheus-blackbox-exporter/Chart.yaml index 5efac629720f..7880530490ca 100644 --- a/charts/prometheus-blackbox-exporter/Chart.yaml +++ b/charts/prometheus-blackbox-exporter/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 description: Prometheus Blackbox Exporter name: prometheus-blackbox-exporter -version: 11.0.1 +version: 12.0.0 appVersion: v0.26.0 kubeVersion: ">=1.21.0-0" home: https://github.com/prometheus/blackbox_exporter From a8671143f4fec214bc2e1d588c7ae8ccbfe65295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Mon, 23 Jun 2025 12:05:04 +0200 Subject: [PATCH 3/3] Update Chart.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Bauer --- charts/prometheus-blackbox-exporter/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/prometheus-blackbox-exporter/Chart.yaml b/charts/prometheus-blackbox-exporter/Chart.yaml index 7880530490ca..5efac629720f 100644 --- a/charts/prometheus-blackbox-exporter/Chart.yaml +++ b/charts/prometheus-blackbox-exporter/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 description: Prometheus Blackbox Exporter name: prometheus-blackbox-exporter -version: 12.0.0 +version: 11.0.1 appVersion: v0.26.0 kubeVersion: ">=1.21.0-0" home: https://github.com/prometheus/blackbox_exporter