Skip to content

Commit d368302

Browse files
authored
fix wrong namespaceSelector in servicemonitor (#127)
Signed-off-by: Le Quoc Tuan <[email protected]>
1 parent e2c5e5d commit d368302

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

charts/coredns/Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: coredns
3-
version: 1.24.3
3+
version: 1.24.4
44
appVersion: 1.10.1
55
home: https://coredns.io
66
icon: https://coredns.io/images/CoreDNS_Colour_Horizontal.png
@@ -19,5 +19,5 @@ engine: gotpl
1919
type: application
2020
annotations:
2121
artifacthub.io/changes: |
22-
- kind: Added
23-
description: Added a job to the github action for repo addition.
22+
- kind: fixed
23+
description: Fix wrong namespaceSelector in ServiceMonitor when using custom monitoring namespace

charts/coredns/templates/servicemonitor.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ metadata:
1515
{{- toYaml . | nindent 4 }}
1616
{{- end }}
1717
spec:
18+
{{- if ne .Values.prometheus.monitor.namespace .Release.Namespace }}
19+
namespaceSelector:
20+
matchNames:
21+
- {{ .Release.Namespace }}
22+
{{- end }}
1823
selector:
1924
matchLabels:
2025
app.kubernetes.io/instance: {{ .Release.Name | quote }}

0 commit comments

Comments
 (0)