Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions deploy/helm/charts/templates/lvm-node-servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) .Values.lvmNode.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "lvmlocalpv.fullname" . }}-node-servicemonitor
namespace: {{- .Release.Namespace }}
labels:
#release: prometheus # Adjust to match your Prometheus Operator's release name
{{- .Values.lvmNode.serviceMonitor.labels | toYaml | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "lvmlocalpv.lvmNode.labels" . | nindent 6 }}
namespaceSelector:
matchNames:
- {{- .Release.Namespace }}
endpoints:
- port: metrics
path: /metrics
interval: 30s
scrapeTimeout: 10s
{{- end }}

6 changes: 5 additions & 1 deletion deploy/helm/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ lvmNode:
burst: 0
# Disable or enable the use of hostNetwork for the lvm node daemonset.
hostNetwork: false

serviceMonitor:
enabled: false
# add labels to the serviceMonitor if you make use of serviceMonitorSelector in prometheus operator
# labels:
# release: prometheus

# lvmController contains the configurables for
# the lvm controller deployment
Expand Down