From fd1dbc397dad6cf55a74dacb8347edbcad230d28 Mon Sep 17 00:00:00 2001 From: Markus Wennrich Date: Mon, 17 Oct 2022 14:53:35 +0200 Subject: [PATCH] remove preStop command (#47) --- config/csi/lb-csi-plugin.yaml | 4 ---- controllers/resources.go | 7 ------- 2 files changed, 11 deletions(-) diff --git a/config/csi/lb-csi-plugin.yaml b/config/csi/lb-csi-plugin.yaml index de5bf5d..de84993 100644 --- a/config/csi/lb-csi-plugin.yaml +++ b/config/csi/lb-csi-plugin.yaml @@ -448,10 +448,6 @@ spec: - "--v=4" - "--csi-address=$(ADDRESS)" - "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)" - lifecycle: - preStop: - exec: - command: ["/bin/sh", "-c", "rm -rf /registration/csi.lightbitslabs.com /registration/csi.lightbitslabs.com-reg.sock"] env: - name: ADDRESS value: /csi/csi.sock diff --git a/controllers/resources.go b/controllers/resources.go index b47ceed..8d83533 100644 --- a/controllers/resources.go +++ b/controllers/resources.go @@ -642,13 +642,6 @@ var ( {Name: "DRIVER_REG_SOCK_PATH", Value: "/var/lib/kubelet/plugins/csi.lightbitslabs.com/csi.sock"}, {Name: "KUBE_NODE_NAME", ValueFrom: &corev1.EnvVarSource{FieldRef: &corev1.ObjectFieldSelector{FieldPath: "spec.nodeName"}}}, }, - Lifecycle: &corev1.Lifecycle{PreStop: &corev1.LifecycleHandler{Exec: &corev1.ExecAction{ - Command: []string{ - "/bin/sh", - "-c", - "rm -rf /registration/csi.lightbitslabs.com /registration/csi.lightbitslabs.com-reg.sock", - }, - }}}, VolumeMounts: []corev1.VolumeMount{ {Name: pluginDirVolume.Name, MountPath: "/csi"}, {Name: registrationDirVolume.Name, MountPath: "/registration/"},