deploy: remove preStop hook from daemonset templates

The lifecycle preStop hook fails on container stop / exit
because /bin/sh is not present in the driver registrar container
image.

the driver-registrar will remove the socket file
before stopping. we dont need to have any preStop hook
to remove the socket as it was not working as expected

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2020-08-24 13:27:29 +05:30 committed by mergify[bot]
parent b8bd233b15
commit f2edc926cf
4 changed files with 0 additions and 40 deletions

View File

@ -44,18 +44,6 @@ spec:
- "--v=5"
- "--csi-address=/csi/{{ .Values.pluginSocketFile }}"
- "--kubelet-registration-path={{ .Values.socketDir }}/{{ .Values.pluginSocketFile }}"
lifecycle:
preStop:
exec:
{{- /*
NOTE(wilmardo): The replace functions ensures there are no spaces in the string.
To avoid `rm -rf /registration/driver name`
*/}}
command: [
"/bin/sh", "-c",
"rm -rf /registration/{{ .Values.driverName | replace " " "" }} \
/registration/{{ .Values.driverName | replace " " "" }}-reg.sock"
]
env:
- name: KUBE_NODE_NAME
valueFrom:

View File

@ -45,18 +45,6 @@ spec:
- "--v=5"
- "--csi-address=/csi/{{ .Values.pluginSocketFile }}"
- "--kubelet-registration-path={{ .Values.socketDir }}/{{ .Values.pluginSocketFile }}"
lifecycle:
preStop:
exec:
{{- /*
NOTE(wilmardo): The replace functions ensures there are no spaces in the string.
To avoid `rm -rf /registration/driver name`
*/}}
command: [
"/bin/sh", "-c",
"rm -rf /registration/{{ .Values.driverName | replace " " "" }} \
/registration/{{ .Values.driverName | replace " " "" }}-reg.sock"
]
env:
- name: KUBE_NODE_NAME
valueFrom:

View File

@ -29,14 +29,6 @@ spec:
- "--v=5"
- "--csi-address=/csi/csi.sock"
- "--kubelet-registration-path=/var/lib/kubelet/plugins/cephfs.csi.ceph.com/csi.sock"
lifecycle:
preStop:
exec:
command: [
"/bin/sh", "-c",
"rm -rf /registration/cephfs.csi.ceph.com \
/registration/cephfs.csi.ceph.com-reg.sock"
]
env:
- name: KUBE_NODE_NAME
valueFrom:

View File

@ -30,14 +30,6 @@ spec:
- "--v=5"
- "--csi-address=/csi/csi.sock"
- "--kubelet-registration-path=/var/lib/kubelet/plugins/rbd.csi.ceph.com/csi.sock"
lifecycle:
preStop:
exec:
command: [
"/bin/sh", "-c",
"rm -rf /registration/rbd.csi.ceph.com \
/registration/rbd.csi.ceph.com-reg.sock"
]
env:
- name: KUBE_NODE_NAME
valueFrom: