From 3a76492fc6c4a7f22b3465f2e2afaa82413de105 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Wed, 25 May 2022 09:11:35 +0100 Subject: [PATCH] Remove metrics server Prometheus scrape annotations if using podMonitor Signed-off-by: Max Howell --- keda/templates/22-metrics-deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keda/templates/22-metrics-deployment.yaml b/keda/templates/22-metrics-deployment.yaml index 966c97b5..fa969429 100644 --- a/keda/templates/22-metrics-deployment.yaml +++ b/keda/templates/22-metrics-deployment.yaml @@ -25,7 +25,7 @@ spec: {{- toYaml .Values.podLabels.metricsAdapter | nindent 8}} {{- end }} annotations: - {{- if .Values.prometheus.metricServer.enabled }} + {{- if and .Values.prometheus.metricServer.enabled ( not .Values.prometheus.metricServer.podMonitor.enabled ) }} prometheus.io/scrape: "true" prometheus.io/port: {{ .Values.prometheus.metricServer.port | quote }} prometheus.io/path: {{ .Values.prometheus.metricServer.path }}