From 6bae8e4f6a6ecd15d0f9b902502658efdea680f6 Mon Sep 17 00:00:00 2001 From: Richard Wall Date: Thu, 25 Jul 2024 10:30:03 +0100 Subject: [PATCH] Refer to the named port of the service to avoid duplicate prometheus scrape targets Signed-off-by: Richard Wall --- .../approver-policy/templates/metrics-servicemonitor.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/charts/approver-policy/templates/metrics-servicemonitor.yaml b/deploy/charts/approver-policy/templates/metrics-servicemonitor.yaml index 94697359..beed3800 100644 --- a/deploy/charts/approver-policy/templates/metrics-servicemonitor.yaml +++ b/deploy/charts/approver-policy/templates/metrics-servicemonitor.yaml @@ -20,7 +20,7 @@ spec: matchNames: - {{ .Release.Namespace }} endpoints: - - targetPort: {{ .Values.app.metrics.port }} + - port: metrics path: "/metrics" interval: {{ .Values.app.metrics.service.servicemonitor.interval }} scrapeTimeout: {{ .Values.app.metrics.service.servicemonitor.scrapeTimeout }}