Move MountsInGlobalPDPath from mount pkg to volume
Since pkg/util/mount is going to move out of k/k, this exported constant that is Kubernetes specific needed to move somewhere else. Made sense to move it to pkg/volume/util. Update GetDeviceNameFromMount in the mount interface to now take a pluginMountDir argument, which is volume plugin dir with the global mount path appended to it already.
This commit is contained in:
@@ -41,6 +41,7 @@ import (
|
||||
"k8s.io/kubernetes/pkg/util/mount"
|
||||
"k8s.io/kubernetes/pkg/util/node"
|
||||
"k8s.io/kubernetes/pkg/volume"
|
||||
volutil "k8s.io/kubernetes/pkg/volume/util"
|
||||
utilpath "k8s.io/utils/path"
|
||||
)
|
||||
|
||||
@@ -255,7 +256,7 @@ func makePDNameInternal(host volume.VolumeHost, pool string, image string) strin
|
||||
return deprecatedDir
|
||||
}
|
||||
// Return the canonical format path.
|
||||
return path.Join(host.GetPluginDir(rbdPluginName), mount.MountsInGlobalPDPath, pool+"-image-"+image)
|
||||
return path.Join(host.GetPluginDir(rbdPluginName), volutil.MountsInGlobalPDPath, pool+"-image-"+image)
|
||||
}
|
||||
|
||||
// Make a directory like /var/lib/kubelet/plugins/kubernetes.io/rbd/volumeDevices/pool-image-image.
|
||||
|
Reference in New Issue
Block a user