mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-03 19:58:17 +00:00
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:
@@ -58,6 +58,10 @@ const (
|
||||
// that decides if pod volumes are unmounted when pod is terminated
|
||||
KeepTerminatedPodVolumesAnnotation string = "volumes.kubernetes.io/keep-terminated-pod-volumes"
|
||||
|
||||
// MountsInGlobalPDPath is name of the directory appended to a volume plugin
|
||||
// name to create the place for volume mounts in the global PD path.
|
||||
MountsInGlobalPDPath = "mounts"
|
||||
|
||||
// VolumeGidAnnotationKey is the of the annotation on the PersistentVolume
|
||||
// object that specifies a supplemental GID.
|
||||
VolumeGidAnnotationKey = "pv.beta.kubernetes.io/gid"
|
||||
@@ -530,3 +534,10 @@ func MapBlockVolume(
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetPluginMountDir returns the global mount directory name appended
|
||||
// to the given plugin name's plugin directory
|
||||
func GetPluginMountDir(host volume.VolumeHost, name string) string {
|
||||
mntDir := filepath.Join(host.GetPluginDir(name), MountsInGlobalPDPath)
|
||||
return mntDir
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user