diff --git a/deploy/charts/rawfile-csi/templates/00-rbac.yaml b/deploy/charts/rawfile-csi/templates/00-rbac.yaml index 00c0d18..0f09610 100644 --- a/deploy/charts/rawfile-csi/templates/00-rbac.yaml +++ b/deploy/charts/rawfile-csi/templates/00-rbac.yaml @@ -37,6 +37,9 @@ rules: - apiGroups: [""] resources: ["nodes"] verbs: ["get", "list", "watch"] + - apiGroups: ["storage.k8s.io"] + resources: ["volumeattachments"] + verbs: ["get", "list", "watch"] --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 diff --git a/deploy/charts/rawfile-csi/templates/01-controller-plugin.yaml b/deploy/charts/rawfile-csi/templates/01-controller-plugin.yaml index a524571..0751b50 100644 --- a/deploy/charts/rawfile-csi/templates/01-controller-plugin.yaml +++ b/deploy/charts/rawfile-csi/templates/01-controller-plugin.yaml @@ -55,10 +55,29 @@ spec: volumeMounts: - name: socket-dir mountPath: /csi + ports: + - name: csi-probe + containerPort: 9808 + livenessProbe: + failureThreshold: 5 + httpGet: + path: /healthz + port: csi-probe + initialDelaySeconds: 10 + timeoutSeconds: 3 + periodSeconds: 2 resources: {{- toYaml .Values.controller.resources | nindent 12 }} - - name: csi-provisioner - image: quay.io/k8scsi/csi-provisioner:v1.6.0 + - name: liveness-probe + image: k8s.gcr.io/sig-storage/livenessprobe:v2.1.0 + imagePullPolicy: IfNotPresent + args: + - --csi-address=/csi/csi.sock + volumeMounts: + - name: socket-dir + mountPath: /csi + - name: external-provisioner + image: k8s.gcr.io/sig-storage/csi-provisioner:v2.0.0 imagePullPolicy: IfNotPresent args: - "--csi-address=$(ADDRESS)" @@ -70,11 +89,12 @@ spec: volumeMounts: - name: socket-dir mountPath: /csi - - name: csi-resizer - image: quay.io/k8scsi/csi-resizer:v0.5.0 + - name: external-resizer + image: quay.io/k8scsi/csi-resizer:v1.0.0 imagePullPolicy: IfNotPresent args: - "--csi-address=$(ADDRESS)" + - "--handle-volume-inuse-error=false" env: - name: ADDRESS value: /csi/csi.sock diff --git a/deploy/charts/rawfile-csi/templates/01-node-plugin.yaml b/deploy/charts/rawfile-csi/templates/01-node-plugin.yaml index bd8619e..c6abcd0 100644 --- a/deploy/charts/rawfile-csi/templates/01-node-plugin.yaml +++ b/deploy/charts/rawfile-csi/templates/01-node-plugin.yaml @@ -78,6 +78,16 @@ spec: ports: - name: metrics containerPort: 9100 + - name: csi-probe + containerPort: 9808 + livenessProbe: + failureThreshold: 5 + httpGet: + path: /healthz + port: csi-probe + initialDelaySeconds: 10 + timeoutSeconds: 3 + periodSeconds: 2 volumeMounts: - name: socket-dir mountPath: /csi @@ -88,26 +98,35 @@ spec: mountPath: /data resources: {{- toYaml .Values.node.resources | nindent 12 }} - - name: node-driver-registrar - image: quay.io/k8scsi/csi-node-driver-registrar:v1.2.0 + - name: liveness-probe + image: k8s.gcr.io/sig-storage/livenessprobe:v2.1.0 + imagePullPolicy: IfNotPresent + args: + - --csi-address=/csi/csi.sock + volumeMounts: + - name: socket-dir + mountPath: /csi + - name: node-driver-registrar + image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.0.1 imagePullPolicy: IfNotPresent - lifecycle: - preStop: - exec: - command: - - /bin/sh - - -c - - | - rm -rf /registration/rawfile-csi /csi/csi.sock args: - - --v=5 - --csi-address=$(ADDRESS) - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH) + - --health-port=9809 env: - name: ADDRESS value: /csi/csi.sock - name: DRIVER_REG_SOCK_PATH value: /var/lib/kubelet/plugins/rawfile-csi/csi.sock + ports: + - containerPort: 9809 + name: healthz + livenessProbe: + httpGet: + path: /healthz + port: healthz + initialDelaySeconds: 5 + timeoutSeconds: 5 volumeMounts: - name: socket-dir mountPath: /csi