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