diff --git a/charts/aws-ebs-csi-driver/templates/node-windows.yaml b/charts/aws-ebs-csi-driver/templates/node-windows.yaml index 4cafd752ff..42cc091dce 100644 --- a/charts/aws-ebs-csi-driver/templates/node-windows.yaml +++ b/charts/aws-ebs-csi-driver/templates/node-windows.yaml @@ -117,11 +117,21 @@ spec: {{- with .Values.sidecars.nodeDriverRegistrar.env }} {{- . | toYaml | nindent 12 }} {{- end }} + livenessProbe: + exec: + command: + - /csi-node-driver-registrar.exe + - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH) + - --mode=kubelet-registration-probe + initialDelaySeconds: 30 + timeoutSeconds: 15 volumeMounts: - name: plugin-dir mountPath: C:\csi - name: registration-dir mountPath: C:\registration + - name: probe-dir + mountPath: C:\var\lib\kubelet\plugins\ebs.csi.aws.com {{- with default .Values.node.resources .Values.sidecars.nodeDriverRegistrar.resources }} resources: {{- toYaml . | nindent 12 }} @@ -169,4 +179,6 @@ spec: hostPath: path: \\.\pipe\csi-proxy-filesystem-v1 type: "" + - name: probe-dir + emptyDir: {} {{- end }} diff --git a/charts/aws-ebs-csi-driver/templates/node.yaml b/charts/aws-ebs-csi-driver/templates/node.yaml index cbb190bd0c..520c09ea17 100644 --- a/charts/aws-ebs-csi-driver/templates/node.yaml +++ b/charts/aws-ebs-csi-driver/templates/node.yaml @@ -129,11 +129,21 @@ spec: {{- with .Values.controller.envFrom }} {{- . | toYaml | nindent 12 }} {{- end }} + livenessProbe: + exec: + command: + - /csi-node-driver-registrar + - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH) + - --mode=kubelet-registration-probe + initialDelaySeconds: 30 + timeoutSeconds: 15 volumeMounts: - name: plugin-dir mountPath: /csi - name: registration-dir mountPath: /registration + - name: probe-dir + mountPath: {{ printf "%s/plugins/ebs.csi.aws.com/" (trimSuffix "/" .Values.node.kubeletPath) }} {{- with default .Values.node.resources .Values.sidecars.nodeDriverRegistrar.resources }} resources: {{- toYaml . | nindent 12 }} @@ -185,3 +195,5 @@ spec: hostPath: path: /dev type: Directory + - name: probe-dir + emptyDir: {} diff --git a/deploy/kubernetes/base/node.yaml b/deploy/kubernetes/base/node.yaml index df2cc491b5..c5385a02f0 100644 --- a/deploy/kubernetes/base/node.yaml +++ b/deploy/kubernetes/base/node.yaml @@ -102,11 +102,21 @@ spec: - name: DRIVER_REG_SOCK_PATH value: /var/lib/kubelet/plugins/ebs.csi.aws.com/csi.sock envFrom: + livenessProbe: + exec: + command: + - /csi-node-driver-registrar + - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH) + - --mode=kubelet-registration-probe + initialDelaySeconds: 30 + timeoutSeconds: 15 volumeMounts: - name: plugin-dir mountPath: /csi - name: registration-dir mountPath: /registration + - name: probe-dir + mountPath: /var/lib/kubelet/plugins/ebs.csi.aws.com/ resources: limits: cpu: 100m @@ -153,3 +163,5 @@ spec: hostPath: path: /dev type: Directory + - name: probe-dir + emptyDir: {}