Initial commit
This commit is contained in:
23
charts/lvm-localpv/templates/lvm-node-servicemonitor.yaml
Normal file
23
charts/lvm-localpv/templates/lvm-node-servicemonitor.yaml
Normal file
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user