mirror of https://github.com/k3s-io/k3s
Fix the comment for csi block pathes to make look the same to filesystem
parent
6d7b5f1d1b
commit
9c56b53390
|
@ -52,7 +52,7 @@ type csiBlockMapper struct {
|
|||
var _ volume.BlockVolumeMapper = &csiBlockMapper{}
|
||||
|
||||
// GetGlobalMapPath returns a global map path (on the node) to a device file which will be symlinked to
|
||||
// Example: plugins/kubernetes.io/csi/volumeDevices/{volumeID}/dev
|
||||
// Example: plugins/kubernetes.io/csi/volumeDevices/{pvname}/dev
|
||||
func (m *csiBlockMapper) GetGlobalMapPath(spec *volume.Spec) (string, error) {
|
||||
dir := getVolumeDevicePluginDir(spec.Name(), m.plugin.host)
|
||||
klog.V(4).Infof(log("blockMapper.GetGlobalMapPath = %s", dir))
|
||||
|
@ -60,21 +60,21 @@ func (m *csiBlockMapper) GetGlobalMapPath(spec *volume.Spec) (string, error) {
|
|||
}
|
||||
|
||||
// getStagingPath returns a staging path for a directory (on the node) that should be used on NodeStageVolume/NodeUnstageVolume
|
||||
// Example: plugins/kubernetes.io/csi/volumeDevices/staging/{volumeID}
|
||||
// Example: plugins/kubernetes.io/csi/volumeDevices/staging/{pvname}
|
||||
func (m *csiBlockMapper) getStagingPath() string {
|
||||
sanitizedSpecVolID := kstrings.EscapeQualifiedNameForDisk(m.specName)
|
||||
return path.Join(m.plugin.host.GetVolumeDevicePluginDir(csiPluginName), "staging", sanitizedSpecVolID)
|
||||
}
|
||||
|
||||
// getPublishPath returns a publish path for a file (on the node) that should be used on NodePublishVolume/NodeUnpublishVolume
|
||||
// Example: plugins/kubernetes.io/csi/volumeDevices/publish/{volumeID}
|
||||
// Example: plugins/kubernetes.io/csi/volumeDevices/publish/{pvname}
|
||||
func (m *csiBlockMapper) getPublishPath() string {
|
||||
sanitizedSpecVolID := kstrings.EscapeQualifiedNameForDisk(m.specName)
|
||||
return path.Join(m.plugin.host.GetVolumeDevicePluginDir(csiPluginName), "publish", sanitizedSpecVolID)
|
||||
}
|
||||
|
||||
// GetPodDeviceMapPath returns pod's device file which will be mapped to a volume
|
||||
// returns: pods/{podUid}/volumeDevices/kubernetes.io~csi, {volumeID}
|
||||
// returns: pods/{podUid}/volumeDevices/kubernetes.io~csi, {pvname}
|
||||
func (m *csiBlockMapper) GetPodDeviceMapPath() (string, string) {
|
||||
path := m.plugin.host.GetPodVolumeDeviceDir(m.podUID, kstrings.EscapeQualifiedNameForDisk(csiPluginName))
|
||||
specName := m.specName
|
||||
|
|
Loading…
Reference in New Issue