diff --git a/charts/coredns/Chart.yaml b/charts/coredns/Chart.yaml index 1bf62e9..1016e1f 100644 --- a/charts/coredns/Chart.yaml +++ b/charts/coredns/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: coredns -version: 1.24.3 +version: 1.24.4 appVersion: 1.10.1 home: https://coredns.io icon: https://coredns.io/images/CoreDNS_Colour_Horizontal.png @@ -19,5 +19,5 @@ engine: gotpl type: application annotations: artifacthub.io/changes: | - - kind: Added - description: Added a job to the github action for repo addition. + - kind: fixed + description: Fix wrong namespaceSelector in ServiceMonitor when using custom monitoring namespace diff --git a/charts/coredns/templates/servicemonitor.yaml b/charts/coredns/templates/servicemonitor.yaml index 1c8fa27..b5fc642 100644 --- a/charts/coredns/templates/servicemonitor.yaml +++ b/charts/coredns/templates/servicemonitor.yaml @@ -15,6 +15,11 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: + {{- if ne .Values.prometheus.monitor.namespace .Release.Namespace }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} + {{- end }} selector: matchLabels: app.kubernetes.io/instance: {{ .Release.Name | quote }}