Skip to content

Commit

Permalink
fix prestop in juicefs-plugin. mv reg.sock prestop in node-driver-reg…
Browse files Browse the repository at this point in the history
…istar container (#397)
  • Loading branch information
zwwhdls authored Aug 24, 2022
1 parent 96ca368 commit 2d1ea65
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
11 changes: 8 additions & 3 deletions deploy/k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ spec:
command:
- /bin/sh
- -c
- rm /registration/csi.juicefs.com-reg.sock /csi/csi.sock
- rm /csi/csi.sock
livenessProbe:
failureThreshold: 5
httpGet:
Expand Down Expand Up @@ -450,8 +450,6 @@ spec:
- mountPath: /root/.juicefs
mountPropagation: Bidirectional
name: jfs-root-dir
- mountPath: /registration
name: registration-dir
- args:
- --csi-address=$(ADDRESS)
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
Expand All @@ -462,6 +460,13 @@ spec:
- name: DRIVER_REG_SOCK_PATH
value: /var/lib/kubelet/csi-plugins/csi.juicefs.com/csi.sock
image: quay.io/k8scsi/csi-node-driver-registrar:v1.3.0
lifecycle:
preStop:
exec:
command:
- /bin/sh
- -c
- rm /registration/csi.juicefs.com-reg.sock
name: node-driver-registrar
volumeMounts:
- mountPath: /csi
Expand Down
11 changes: 8 additions & 3 deletions deploy/k8s_before_v1_18.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ spec:
command:
- /bin/sh
- -c
- rm /registration/csi.juicefs.com-reg.sock /csi/csi.sock
- rm /csi/csi.sock
livenessProbe:
failureThreshold: 5
httpGet:
Expand Down Expand Up @@ -450,8 +450,6 @@ spec:
- mountPath: /root/.juicefs
mountPropagation: Bidirectional
name: jfs-root-dir
- mountPath: /registration
name: registration-dir
- args:
- --csi-address=$(ADDRESS)
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
Expand All @@ -462,6 +460,13 @@ spec:
- name: DRIVER_REG_SOCK_PATH
value: /var/lib/kubelet/csi-plugins/csi.juicefs.com/csi.sock
image: quay.io/k8scsi/csi-node-driver-registrar:v1.3.0
lifecycle:
preStop:
exec:
command:
- /bin/sh
- -c
- rm /registration/csi.juicefs.com-reg.sock
name: node-driver-registrar
volumeMounts:
- mountPath: /csi
Expand Down
11 changes: 8 additions & 3 deletions deploy/kubernetes/base/resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -377,15 +377,13 @@ spec:
- mountPath: /root/.juicefs
mountPropagation: Bidirectional
name: jfs-root-dir
- name: registration-dir
mountPath: /registration
lifecycle:
preStop:
exec:
command:
- /bin/sh
- -c
- rm /registration/csi.juicefs.com-reg.sock /csi/csi.sock
- rm /csi/csi.sock
ports:
- name: healthz
containerPort: 9909
Expand Down Expand Up @@ -414,6 +412,13 @@ spec:
mountPath: /csi
- name: registration-dir
mountPath: /registration
lifecycle:
preStop:
exec:
command:
- /bin/sh
- -c
- rm /registration/csi.juicefs.com-reg.sock
- name: liveness-probe
image: quay.io/k8scsi/livenessprobe:v1.1.0
args:
Expand Down

0 comments on commit 2d1ea65

Please sign in to comment.