Skip to content

Commit

Permalink
fix: add namespaceSelector on serviceMonitor
Browse files Browse the repository at this point in the history
Co-authored-by: Richard Boldiš <[email protected]>
Co-authored-by: Kate <[email protected]>
Signed-off-by: WrenIX <[email protected]>
  • Loading branch information
3 people committed Feb 4, 2024
1 parent 0ffea21 commit 704829e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/nextcloud/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: nextcloud
version: 4.5.18
version: 4.5.19
appVersion: 28.0.2
description: A file sharing server that puts the control and security of your own data back into your hands.
keywords:
Expand Down
4 changes: 4 additions & 0 deletions charts/nextcloud/templates/metrics/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ spec:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: metrics
namespaceSelector:
{{- with .Values.metrics.serviceMonitor.namespaceSelector }}
{{- toYaml . | nindent 4 }}
{{- else }}
matchNames:
- {{ .Release.Namespace | quote }}
{{- end }}
endpoints:
- port: metrics
path: "/"
Expand Down
3 changes: 3 additions & 0 deletions charts/nextcloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,9 @@ metrics:
##
namespace: ""

## @param metrics.serviceMonitor.namespaceSelector The selector of the namespace where the target service is located (defaults to the release namespace)
namespaceSelector:

## @param metrics.serviceMonitor.jobLabel The name of the label on the target service to use as the job name in prometheus.
##
jobLabel: ""
Expand Down

0 comments on commit 704829e

Please sign in to comment.