Skip to content

Commit

Permalink
fix wrong namespaceSelector in servicemonitor (#127)
Browse files Browse the repository at this point in the history
Signed-off-by: Le Quoc Tuan <mr.lequoctuan@gmail.com>
  • Loading branch information
tulequ authored Aug 8, 2023
1 parent e2c5e5d commit d368302
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions charts/coredns/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
5 changes: 5 additions & 0 deletions charts/coredns/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit d368302

Please sign in to comment.