mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 14:20:19 +00:00
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:
parent
b8bd233b15
commit
f2edc926cf
@ -44,18 +44,6 @@ spec:
|
|||||||
- "--v=5"
|
- "--v=5"
|
||||||
- "--csi-address=/csi/{{ .Values.pluginSocketFile }}"
|
- "--csi-address=/csi/{{ .Values.pluginSocketFile }}"
|
||||||
- "--kubelet-registration-path={{ .Values.socketDir }}/{{ .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:
|
env:
|
||||||
- name: KUBE_NODE_NAME
|
- name: KUBE_NODE_NAME
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
@ -45,18 +45,6 @@ spec:
|
|||||||
- "--v=5"
|
- "--v=5"
|
||||||
- "--csi-address=/csi/{{ .Values.pluginSocketFile }}"
|
- "--csi-address=/csi/{{ .Values.pluginSocketFile }}"
|
||||||
- "--kubelet-registration-path={{ .Values.socketDir }}/{{ .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:
|
env:
|
||||||
- name: KUBE_NODE_NAME
|
- name: KUBE_NODE_NAME
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
@ -29,14 +29,6 @@ spec:
|
|||||||
- "--v=5"
|
- "--v=5"
|
||||||
- "--csi-address=/csi/csi.sock"
|
- "--csi-address=/csi/csi.sock"
|
||||||
- "--kubelet-registration-path=/var/lib/kubelet/plugins/cephfs.csi.ceph.com/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:
|
env:
|
||||||
- name: KUBE_NODE_NAME
|
- name: KUBE_NODE_NAME
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
@ -30,14 +30,6 @@ spec:
|
|||||||
- "--v=5"
|
- "--v=5"
|
||||||
- "--csi-address=/csi/csi.sock"
|
- "--csi-address=/csi/csi.sock"
|
||||||
- "--kubelet-registration-path=/var/lib/kubelet/plugins/rbd.csi.ceph.com/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:
|
env:
|
||||||
- name: KUBE_NODE_NAME
|
- name: KUBE_NODE_NAME
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
Loading…
Reference in New Issue
Block a user