Use inner volume name instead of outer volume name for subpath directory

This commit is contained in:
Michelle Au
2018-03-19 16:21:35 -07:00
parent 67be0a90f4
commit 91c557f504
6 changed files with 103 additions and 7 deletions

View File

@@ -672,7 +672,7 @@ func (og *operationGenerator) GenerateUnmountVolumeFunc(
// Remove all bind-mounts for subPaths
podDir := path.Join(podsDir, string(volumeToUnmount.PodUID))
if err := mounter.CleanSubPaths(podDir, volumeToUnmount.OuterVolumeSpecName); err != nil {
if err := mounter.CleanSubPaths(podDir, volumeToUnmount.InnerVolumeSpecName); err != nil {
return volumeToUnmount.GenerateError("error cleaning subPath mounts", err)
}