Skip to content

Commit

Permalink
Merge pull request #2521 from andyzhangx/fix-liveness-proble-failure-…
Browse files Browse the repository at this point in the history
…linux

fix: liveness probe failure when hostNetwork not enabled on linux node
  • Loading branch information
andyzhangx authored Sep 18, 2024
2 parents 3062736 + bb64c6e commit 9e38fb2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
Binary file modified charts/latest/azuredisk-csi-driver-v0.0.0.tgz
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ spec:
args:
- --csi-address=/csi/csi.sock
- --probe-timeout=3s
{{- if eq .Values.node.hostNetwork true }}
- --http-endpoint=localhost:{{ .Values.node.livenessProbe.healthPort }}
{{- else }}
- --health-port={{ .Values.node.livenessProbe.healthPort }}
{{- end }}
- --v=2
resources: {{- toYaml .Values.linux.resources.livenessProbe | nindent 12 }}
securityContext:
Expand Down Expand Up @@ -140,12 +144,22 @@ spec:
- "--get-node-info-from-labels={{ .Values.linux.getNodeInfoFromLabels }}"
- "--get-nodeid-from-imds={{ .Values.node.getNodeIDFromIMDS }}"
- "--enable-otel-tracing={{ .Values.linux.otelTracing.enabled }}"
{{- if ne .Values.node.hostNetwork true }}
ports:
- containerPort: {{ .Values.node.livenessProbe.healthPort }}
name: healthz
protocol: TCP
{{- end }}
livenessProbe:
failureThreshold: 5
httpGet:
host: localhost
path: /healthz
{{- if eq .Values.node.hostNetwork true }}
host: localhost
port: {{ .Values.node.livenessProbe.healthPort }}
{{- else }}
port: healthz
{{- end }}
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 30
Expand Down
4 changes: 4 additions & 0 deletions deploy/csi-azuredisk-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ spec:
- "--enable-perf-optimization=true"
- "--allow-empty-cloud-config=true"
- "--get-node-info-from-labels=false"
ports:
- containerPort: 29603
name: healthz
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
Expand Down

0 comments on commit 9e38fb2

Please sign in to comment.