From 4c8dc512868c37453c3dea0fe7e1d831e5ddb5a4 Mon Sep 17 00:00:00 2001 From: dongjiang Date: Fri, 15 Mar 2024 18:26:21 +0800 Subject: [PATCH] [prometheus-mysql-exporter]: Add `metrics` when multipleTarget enable (#4356) * add service monitor Signed-off-by: dongjiang1989 * update chart version Signed-off-by: dongjiang1989 * fix bug Signed-off-by: dongjiang1989 * fix bug Signed-off-by: dongjiang1989 --------- Signed-off-by: dongjiang1989 --- charts/prometheus-mysql-exporter/Chart.yaml | 2 +- charts/prometheus-mysql-exporter/templates/servicemonitor.yaml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/charts/prometheus-mysql-exporter/Chart.yaml b/charts/prometheus-mysql-exporter/Chart.yaml index 3608fad30dd2..26f350bfa53a 100644 --- a/charts/prometheus-mysql-exporter/Chart.yaml +++ b/charts/prometheus-mysql-exporter/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: A Helm chart for prometheus mysql exporter with cloudsqlproxy name: prometheus-mysql-exporter -version: 2.5.0 +version: 2.5.1 home: https://github.com/prometheus/mysqld_exporter appVersion: v0.15.1 sources: diff --git a/charts/prometheus-mysql-exporter/templates/servicemonitor.yaml b/charts/prometheus-mysql-exporter/templates/servicemonitor.yaml index a3caf528c20c..59108d9d3209 100644 --- a/charts/prometheus-mysql-exporter/templates/servicemonitor.yaml +++ b/charts/prometheus-mysql-exporter/templates/servicemonitor.yaml @@ -72,7 +72,7 @@ spec: - client.{{ .name }} {{- end }} {{- end }} - {{- else }} + {{- end }} - path: /metrics port: {{ .Values.service.name }} {{- if .Values.serviceMonitor.interval }} @@ -87,5 +87,4 @@ spec: {{- if .Values.serviceMonitor.relabelings }} relabelings: {{ toYaml .Values.serviceMonitor.relabelings | nindent 8 }} {{- end }} - {{- end }} {{- end }}