From e17927ba52e852c3a604f257838ad1c00a2a8e86 Mon Sep 17 00:00:00 2001 From: Kazuki Suda <230185+superbrothers@users.noreply.github.com> Date: Fri, 11 Aug 2023 23:09:27 +0900 Subject: [PATCH] helm: Use .Release.Namespace as default for ServiceMonitor namespace (#10249) Signed-off-by: Kazuki Suda --- charts/ingress-nginx/templates/controller-servicemonitor.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/ingress-nginx/templates/controller-servicemonitor.yaml b/charts/ingress-nginx/templates/controller-servicemonitor.yaml index 8ab16f0b25..482fe7f3c6 100644 --- a/charts/ingress-nginx/templates/controller-servicemonitor.yaml +++ b/charts/ingress-nginx/templates/controller-servicemonitor.yaml @@ -5,6 +5,8 @@ metadata: name: {{ include "ingress-nginx.controller.fullname" . }} {{- if .Values.controller.metrics.serviceMonitor.namespace }} namespace: {{ .Values.controller.metrics.serviceMonitor.namespace | quote }} +{{- else }} + namespace: {{ .Release.Namespace }} {{- end }} labels: {{- include "ingress-nginx.labels" . | nindent 4 }}