Skip to content

Commit edd3a66

Browse files
committed
fix: liveness probe failure when hostNetwork not enabled in controller
1 parent 3e981a3 commit edd3a66

File tree

4 files changed

+28
-2
lines changed

4 files changed

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

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

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@ spec:
9191
args:
9292
- --csi-address=/csi/csi.sock
9393
- --probe-timeout=3s
94+
{{- if eq .Values.controller.hostNetwork true }}
9495
- --http-endpoint=localhost:{{ .Values.controller.livenessProbe.healthPort }}
96+
{{- else }}
97+
- --health-port={{ .Values.controller.livenessProbe.healthPort }}
98+
{{- end }}
9599
imagePullPolicy: {{ .Values.image.livenessProbe.pullPolicy }}
96100
volumeMounts:
97101
- name: socket-dir
@@ -117,12 +121,21 @@ spec:
117121
- containerPort: {{ .Values.controller.metricsPort }}
118122
name: metrics
119123
protocol: TCP
124+
{{- if ne .Values.controller.hostNetwork true }}
125+
- containerPort: {{ .Values.controller.livenessProbe.healthPort }}
126+
name: healthz
127+
protocol: TCP
128+
{{- end }}
120129
livenessProbe:
121130
failureThreshold: 5
122131
httpGet:
123-
host: localhost
124132
path: /healthz
133+
{{- if eq .Values.controller.hostNetwork true }}
134+
host: localhost
125135
port: {{ .Values.controller.livenessProbe.healthPort }}
136+
{{- else }}
137+
port: healthz
138+
{{- end }}
126139
initialDelaySeconds: 30
127140
timeoutSeconds: 10
128141
periodSeconds: 30
60 Bytes
Binary file not shown.

charts/v1.24.1/blob-csi-driver/templates/csi-blob-controller.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@ spec:
9191
args:
9292
- --csi-address=/csi/csi.sock
9393
- --probe-timeout=3s
94+
{{- if eq .Values.controller.hostNetwork true }}
9495
- --http-endpoint=localhost:{{ .Values.controller.livenessProbe.healthPort }}
96+
{{- else }}
97+
- --health-port={{ .Values.controller.livenessProbe.healthPort }}
98+
{{- end }}
9599
imagePullPolicy: {{ .Values.image.livenessProbe.pullPolicy }}
96100
volumeMounts:
97101
- name: socket-dir
@@ -117,12 +121,21 @@ spec:
117121
- containerPort: {{ .Values.controller.metricsPort }}
118122
name: metrics
119123
protocol: TCP
124+
{{- if ne .Values.controller.hostNetwork true }}
125+
- containerPort: {{ .Values.controller.livenessProbe.healthPort }}
126+
name: healthz
127+
protocol: TCP
128+
{{- end }}
120129
livenessProbe:
121130
failureThreshold: 5
122131
httpGet:
123-
host: localhost
124132
path: /healthz
133+
{{- if eq .Values.controller.hostNetwork true }}
134+
host: localhost
125135
port: {{ .Values.controller.livenessProbe.healthPort }}
136+
{{- else }}
137+
port: healthz
138+
{{- end }}
126139
initialDelaySeconds: 30
127140
timeoutSeconds: 10
128141
periodSeconds: 30

0 commit comments

Comments
 (0)