Skip to content

Commit

Permalink
Merge pull request rook#12882 from biz812/feature/service-monitor-nam…
Browse files Browse the repository at this point in the history
…espace

helm: Add ServiceMonitor namespace override
  • Loading branch information
travisn authored Sep 13, 2023
2 parents faa6272 + 54d7839 commit 9b19cab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions Documentation/Helm-Charts/operator-chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ The following table lists the configurable parameters of the rook-operator chart
| `csi.serviceMonitor.enabled` | Enable ServiceMonitor for Ceph CSI drivers | `false` |
| `csi.serviceMonitor.interval` | Service monitor scrape interval | `"5s"` |
| `csi.serviceMonitor.labels` | ServiceMonitor additional labels | `{}` |
| `csi.serviceMonitor.namespace` | Use a different namespace for the ServiceMonitor | `nil` |
| `csi.sidecarLogLevel` | Set logging level for Kubernetes-csi sidecar containers. Supported values from 0 to 5. 0 for general useful logs (the default), 5 for trace level verbosity. | `0` |
| `csi.snapshotter.image` | Kubernetes CSI snapshotter image | `registry.k8s.io/sig-storage/csi-snapshotter:v6.2.2` |
| `csi.topology.domainLabels` | domainLabels define which node labels to use as domains for CSI nodeplugins to advertise their domains | `nil` |
Expand Down
2 changes: 1 addition & 1 deletion deploy/charts/rook-ceph/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: csi-metrics
namespace: {{ .Release.Namespace }}
namespace: {{ .Values.csi.serviceMonitor.namespace | default .Release.Namespace }}
labels: {{- include "library.rook-ceph.labels" . | nindent 4 }}
{{- with .Values.csi.serviceMonitor.labels }}
{{- toYaml . | nindent 4 }}
Expand Down
2 changes: 2 additions & 0 deletions deploy/charts/rook-ceph/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,8 @@ csi:
interval: 5s
# -- ServiceMonitor additional labels
labels: {}
# -- Use a different namespace for the ServiceMonitor
namespace:

# -- Kubelet root directory path (if the Kubelet uses a different path for the `--root-dir` flag)
# @default -- `/var/lib/kubelet`
Expand Down

0 comments on commit 9b19cab

Please sign in to comment.