Merge pull request #121978 from carlory/fix-101332

Remove deprecated comment about cleanup the target_path of CSI volumes
This commit is contained in:
Kubernetes Prow Robot 2024-01-30 15:27:59 -08:00 committed by GitHub
commit c5de44f9a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -434,11 +434,16 @@ func (c *csiMountMgr) TearDownAt(dir string) error {
return errors.New(log("Unmounter.TearDownAt failed: %v", err))
}
// Deprecation: Removal of target_path provided in the NodePublish RPC call
// Removal of target_path provided in the NodePublish RPC call
// (in this case location `dir`) 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. Kubelet will only be responsible for
// removal of json data files it creates and parent directories.
// to the spec.
//
// Kubelet should only be responsible for removal of json data files it
// creates and parent directories.
//
// However, some CSI plugins maybe buggy and don't adhere to the standard,
// so we still need to remove the target_path here if it's unmounted and
// empty.
if err := removeMountDir(c.plugin, dir); err != nil {
return errors.New(log("Unmounter.TearDownAt failed to clean mount dir [%s]: %v", dir, err))
}