From 78cb8f1134c687925cc885cd00e2dd2c4cd4b024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Bed=C5=99ich?= Date: Mon, 5 Jun 2023 14:20:05 +0200 Subject: [PATCH] fix: use `targetPort` instead of `port` on ServiceMonitor --- traefik/templates/servicemonitor.yaml | 2 +- traefik/tests/servicemonitor-config_test.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/traefik/templates/servicemonitor.yaml b/traefik/templates/servicemonitor.yaml index 239b9a30a..f3e128405 100644 --- a/traefik/templates/servicemonitor.yaml +++ b/traefik/templates/servicemonitor.yaml @@ -24,7 +24,7 @@ metadata: spec: jobLabel: {{ .Values.metrics.prometheus.serviceMonitor.jobLabel | default .Release.Name }} endpoints: - - port: metrics + - targetPort: metrics path: /{{ .Values.metrics.prometheus.entryPoint }} {{- with .Values.metrics.prometheus.serviceMonitor.honorLabels }} honorLabels: {{ . }} diff --git a/traefik/tests/servicemonitor-config_test.yaml b/traefik/tests/servicemonitor-config_test.yaml index 6c6ca7310..902c84d1c 100644 --- a/traefik/tests/servicemonitor-config_test.yaml +++ b/traefik/tests/servicemonitor-config_test.yaml @@ -37,7 +37,7 @@ tests: - contains: path: spec.endpoints content: - port: metrics + targetPort: metrics path: /metrics enableHttp2: true followRedirects: true