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

@ -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: