Skip to content

Commit 2bc2f9b

Browse files
wrenixRichardds
andcommitted
fix: add namespaceSelector on serviceMonitor
Co-authored-by: Richard Boldiš <richard@boldis.dev> Signed-off-by: WrenIX <dev.github@wrenix.eu>
1 parent 9e51e9c commit 2bc2f9b

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

charts/nextcloud/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: nextcloud
3-
version: 4.5.17
3+
version: 4.5.18
44
appVersion: 28.0.2
55
description: A file sharing server that puts the control and security of your own data back into your hands.
66
keywords:

charts/nextcloud/templates/metrics/servicemonitor.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ spec:
2525
app.kubernetes.io/instance: {{ .Release.Name }}
2626
app.kubernetes.io/component: metrics
2727
namespaceSelector:
28+
{{- with .Values.metrics.serviceMonitor.namespaceSelector }}
29+
{{- toYaml . | nindent 4 }}
30+
{{- else }}
2831
matchNames:
2932
- {{ .Release.Namespace | quote }}
33+
{{- end }}
3034
endpoints:
3135
- port: metrics
3236
path: "/"

charts/nextcloud/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,9 @@ metrics:
517517
##
518518
namespace: ""
519519

520+
## @param metrics.serviceMonitor.namespaceSelector where service are to discoverd (default release namespace)
521+
namespaceSelector:
522+
520523
## @param metrics.serviceMonitor.jobLabel The name of the label on the target service to use as the job name in prometheus.
521524
##
522525
jobLabel: ""

0 commit comments

Comments
 (0)