Update ServiceMonitor to chart
This commit is contained in:
parent
a6a859fc0e
commit
87dd918a74
@ -1,3 +1,21 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ include "rawfile-csi.fullname" . }}-node
|
||||||
|
labels:
|
||||||
|
{{- include "rawfile-csi.labels" . | nindent 4 }}
|
||||||
|
component: node
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- name: metrics
|
||||||
|
port: 9100
|
||||||
|
targetPort: metrics
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
{{- include "rawfile-csi.selectorLabels" . | nindent 4 }}
|
||||||
|
component: node
|
||||||
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: DaemonSet
|
kind: DaemonSet
|
||||||
metadata:
|
metadata:
|
||||||
@ -49,6 +67,9 @@ spec:
|
|||||||
fieldRef:
|
fieldRef:
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
fieldPath: spec.nodeName
|
fieldPath: spec.nodeName
|
||||||
|
ports:
|
||||||
|
- name: metrics
|
||||||
|
containerPort: 9100
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: socket-dir
|
- name: socket-dir
|
||||||
mountPath: /csi
|
mountPath: /csi
|
||||||
|
21
deploy/charts/rawfile-csi/templates/01-servicemonitor.yaml
Normal file
21
deploy/charts/rawfile-csi/templates/01-servicemonitor.yaml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{{- if .Values.serviceMonitor.enabled }}
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: ServiceMonitor
|
||||||
|
metadata:
|
||||||
|
name: {{ include "rawfile-csi.fullname" . }}-node
|
||||||
|
labels:
|
||||||
|
{{- include "rawfile-csi.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
endpoints:
|
||||||
|
- port: metrics
|
||||||
|
path: /metrics
|
||||||
|
interval: {{ .Values.serviceMonitor.interval }}
|
||||||
|
jobLabel: "helm.sh/chart"
|
||||||
|
namespaceSelector:
|
||||||
|
matchNames:
|
||||||
|
- {{ .Release.Namespace }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "rawfile-csi.selectorLabels" . | nindent 6 }}
|
||||||
|
component: node
|
||||||
|
{{- end }}
|
@ -20,3 +20,6 @@ node:
|
|||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
imagePullSecrets: []
|
imagePullSecrets: []
|
||||||
|
serviceMonitor:
|
||||||
|
enabled: true
|
||||||
|
interval: 15s
|
||||||
|
Loading…
Reference in New Issue
Block a user