From e92dc8d9be385346534221fa67c7132a2a284a15 Mon Sep 17 00:00:00 2001 From: Jonathan Dobson Date: Fri, 23 Apr 2021 16:14:10 -0600 Subject: [PATCH] Deprecate removal of CSI nodepublish path by kubelet (#101332) --- pkg/volume/csi/csi_mounter.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/volume/csi/csi_mounter.go b/pkg/volume/csi/csi_mounter.go index f96e93ce512..eff955877bb 100644 --- a/pkg/volume/csi/csi_mounter.go +++ b/pkg/volume/csi/csi_mounter.go @@ -426,6 +426,9 @@ func removeMountDir(plug *csiPlugin, mountPath string) error { } if !mnt { klog.V(4).Info(log("dir not mounted, deleting it [%s]", mountPath)) + // Deprecation: Removal of this mountPath directory MUST be done by + // the CSI plugin according to the spec. This will no longer be done + // directly as part of TearDown by the kubelet in the future. if err := os.Remove(mountPath); err != nil && !os.IsNotExist(err) { return errors.New(log("failed to remove dir [%s]: %v", mountPath, err)) }