Skip to content

Commit c0be776

Browse files
authored
Merge pull request #1875 from kubernetes-sigs/liveness-probe-fix-1.29
[release-1.29] fix: liveness probe failure when hostNetwork not enabled in controller
2 parents f540235 + 384c3bc commit c0be776

File tree

4 files changed

+28
-2
lines changed

4 files changed

+28
-2
lines changed
64 Bytes
Binary file not shown.

charts/latest/azurefile-csi-driver/templates/csi-azurefile-controller.yaml

+14-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,11 @@ spec:
135135
args:
136136
- --csi-address=/csi/csi.sock
137137
- --probe-timeout=3s
138+
{{- if eq .Values.controller.hostNetwork true }}
138139
- --http-endpoint=localhost:{{ .Values.controller.livenessProbe.healthPort }}
140+
{{- else }}
141+
- --health-port={{ .Values.controller.livenessProbe.healthPort }}
142+
{{- end }}
139143
- --v=2
140144
imagePullPolicy: {{ .Values.image.livenessProbe.pullPolicy }}
141145
volumeMounts:
@@ -163,12 +167,21 @@ spec:
163167
- containerPort: {{ .Values.controller.metricsPort }}
164168
name: metrics
165169
protocol: TCP
170+
{{- if ne .Values.controller.hostNetwork true }}
171+
- containerPort: {{ .Values.controller.livenessProbe.healthPort }}
172+
name: healthz
173+
protocol: TCP
174+
{{- end }}
166175
livenessProbe:
167176
failureThreshold: 5
168177
httpGet:
169-
host: localhost
170178
path: /healthz
179+
{{- if eq .Values.controller.hostNetwork true }}
180+
host: localhost
171181
port: {{ .Values.controller.livenessProbe.healthPort }}
182+
{{- else }}
183+
port: healthz
184+
{{- end }}
172185
initialDelaySeconds: 30
173186
timeoutSeconds: 10
174187
periodSeconds: 30
68 Bytes
Binary file not shown.

charts/v1.29.5/azurefile-csi-driver/templates/csi-azurefile-controller.yaml

+14-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,11 @@ spec:
135135
args:
136136
- --csi-address=/csi/csi.sock
137137
- --probe-timeout=3s
138+
{{- if eq .Values.controller.hostNetwork true }}
138139
- --http-endpoint=localhost:{{ .Values.controller.livenessProbe.healthPort }}
140+
{{- else }}
141+
- --health-port={{ .Values.controller.livenessProbe.healthPort }}
142+
{{- end }}
139143
- --v=2
140144
imagePullPolicy: {{ .Values.image.livenessProbe.pullPolicy }}
141145
volumeMounts:
@@ -163,12 +167,21 @@ spec:
163167
- containerPort: {{ .Values.controller.metricsPort }}
164168
name: metrics
165169
protocol: TCP
170+
{{- if ne .Values.controller.hostNetwork true }}
171+
- containerPort: {{ .Values.controller.livenessProbe.healthPort }}
172+
name: healthz
173+
protocol: TCP
174+
{{- end }}
166175
livenessProbe:
167176
failureThreshold: 5
168177
httpGet:
169-
host: localhost
170178
path: /healthz
179+
{{- if eq .Values.controller.hostNetwork true }}
180+
host: localhost
171181
port: {{ .Values.controller.livenessProbe.healthPort }}
182+
{{- else }}
183+
port: healthz
184+
{{- end }}
172185
initialDelaySeconds: 30
173186
timeoutSeconds: 10
174187
periodSeconds: 30

0 commit comments

Comments
 (0)