Skip to content

Commit 133923d

Browse files
committed
Match the namespace logic with the block above
Signed-off-by: Richard Boldiš <richard@boldis.dev>
1 parent fd7dc9c commit 133923d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

charts/nextcloud/templates/metrics-servicemonitor.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ spec:
2121
jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel | quote }}
2222
namespaceSelector:
2323
matchNames:
24-
- {{ .Release.Namespace }}
24+
{{- if .Values.metrics.serviceMonitor.namespace }}
25+
- {{ .Values.metrics.serviceMonitor.namespace | quote }}
26+
{{- else }}
27+
- {{ .Release.Namespace | quote }}
28+
{{- end }}
2529
selector:
2630
matchLabels:
2731
app.kubernetes.io/name: {{ include "nextcloud.name" . }}

0 commit comments

Comments
 (0)