Skip to content

Commit

Permalink
feat(CSI-303): add metrics and livenessProbe to attacher sidecar
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyberezansky committed Oct 30, 2024
1 parent 8318831 commit b544a22
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
annotations:
prometheus.io/scrape: 'true'
prometheus.io/path: '/metrics'
prometheus.io/port: '{{ .Values.metrics.controllerPort | default 9090 }},{{ .Values.metrics.provisionerPort | default 9091 }},{{ .Values.metrics.resizerPort | default 9092 }},{{ .Values.metrics.snapshotterPort | default 9093 }}'
prometheus.io/port: '{{ .Values.metrics.controllerPort | default 9090 }},{{ .Values.metrics.provisionerPort | default 9091 }},{{ .Values.metrics.resizerPort | default 9092 }},{{ .Values.metrics.snapshotterPort | default 9093 }},{{ .Values.metrics.attacherPort | default 9095 }}'
{{- end }}
spec:
{{- if or .Values.controller.affinity .Values.affinity }}
Expand Down Expand Up @@ -176,15 +176,30 @@ spec:
- "--csi-address=$(ADDRESS)"
- "--v={{ .Values.logLevel | default 5 }}"
- "--timeout=60s"
{{- if .Values.controller.configureAttacherLeaderElection }}
- "--leader-election"
- "--leader-election-namespace={{ .Release.Namespace }}"
{{- end }}
- "--worker-threads={{ .Values.controller.maxConcurrentRequests }}"
{{- if or .Values.metrics.enabled .Values.controller.configureAttacherLeaderElection }}
- "--http-endpoint=:{{ .Values.metrics.attacherPort | default 9095 }}"
{{- end }}
env:
- name: ADDRESS
value: unix:///csi/csi.sock
volumeMounts:
- name: socket-dir
mountPath: /csi
{{- if .Values.controller.configureAttacherLeaderElection }}
livenessProbe:
httpGet:
port: {{ .Values.metrics.attacherPort | default 9095 }}
path: /healthz/leader-election
ports:
- containerPort: {{ .Values.metrics.attacherPort | default 9095 }}
name: pr-metrics
protocol: TCP
{{- end }}
- name: csi-provisioner
{{- if and .Values.hostNetwork (.Capabilities.APIVersions.Has "security.openshift.io/v1/SecurityContextConstraints") }}
securityContext:
Expand Down
4 changes: 4 additions & 0 deletions charts/csi-wekafsplugin/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ controller:
configureResizerLeaderElection: true
# -- Configure snapshotter sidecar for leader election
configureSnapshotterLeaderElection: true
# -- Configure attacher sidecar for leader election
configureAttacherLeaderElection: true
# -- optional nodeSelector for controller components only
nodeSelector: {}
# -- optional affinity for controller components only
Expand Down Expand Up @@ -121,6 +123,8 @@ metrics:
snapshotterPort: 9093
# -- Metrics port for Node Serer
nodePort: 9094
# -- Attacher metrics port
attacherPort: 9095
# -- Tracing URL (For Jaeger tracing engine / OpenTelemetry), optional
# @ignore
tracingUrl: ""
Expand Down

0 comments on commit b544a22

Please sign in to comment.