mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 10:19:50 +00:00
Merge pull request #76860 from SataQiu/fix-golint-volume-20190420
Fix golint failures of pkg/volume/local
This commit is contained in:
commit
b9606bef8d
@ -347,7 +347,6 @@ pkg/volume/csi/fake
|
|||||||
pkg/volume/git_repo
|
pkg/volume/git_repo
|
||||||
pkg/volume/host_path
|
pkg/volume/host_path
|
||||||
pkg/volume/iscsi
|
pkg/volume/iscsi
|
||||||
pkg/volume/local
|
|
||||||
pkg/volume/nfs
|
pkg/volume/nfs
|
||||||
pkg/volume/photon_pd
|
pkg/volume/photon_pd
|
||||||
pkg/volume/portworx
|
pkg/volume/portworx
|
||||||
|
@ -42,7 +42,7 @@ const (
|
|||||||
defaultFSType = "ext4"
|
defaultFSType = "ext4"
|
||||||
)
|
)
|
||||||
|
|
||||||
// This is the primary entrypoint for volume plugins.
|
// ProbeVolumePlugins is the primary entrypoint for volume plugins.
|
||||||
func ProbeVolumePlugins() []volume.VolumePlugin {
|
func ProbeVolumePlugins() []volume.VolumePlugin {
|
||||||
return []volume.VolumePlugin{&localVolumePlugin{}}
|
return []volume.VolumePlugin{&localVolumePlugin{}}
|
||||||
}
|
}
|
||||||
@ -587,15 +587,15 @@ func (u *localVolumeUnmapper) TearDownDevice(mapPath, _ string) error {
|
|||||||
|
|
||||||
// GetGlobalMapPath returns global map path and error.
|
// GetGlobalMapPath returns global map path and error.
|
||||||
// path: plugins/kubernetes.io/kubernetes.io/local-volume/volumeDevices/{volumeName}
|
// path: plugins/kubernetes.io/kubernetes.io/local-volume/volumeDevices/{volumeName}
|
||||||
func (lv *localVolume) GetGlobalMapPath(spec *volume.Spec) (string, error) {
|
func (l *localVolume) GetGlobalMapPath(spec *volume.Spec) (string, error) {
|
||||||
return filepath.Join(lv.plugin.host.GetVolumeDevicePluginDir(utilstrings.EscapeQualifiedName(localVolumePluginName)),
|
return filepath.Join(l.plugin.host.GetVolumeDevicePluginDir(utilstrings.EscapeQualifiedName(localVolumePluginName)),
|
||||||
lv.volName), nil
|
l.volName), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetPodDeviceMapPath returns pod device map path and volume name.
|
// GetPodDeviceMapPath returns pod device map path and volume name.
|
||||||
// path: pods/{podUid}/volumeDevices/kubernetes.io~local-volume
|
// path: pods/{podUid}/volumeDevices/kubernetes.io~local-volume
|
||||||
// volName: local-pv-ff0d6d4
|
// volName: local-pv-ff0d6d4
|
||||||
func (lv *localVolume) GetPodDeviceMapPath() (string, string) {
|
func (l *localVolume) GetPodDeviceMapPath() (string, string) {
|
||||||
return lv.plugin.host.GetPodVolumeDeviceDir(lv.podUID,
|
return l.plugin.host.GetPodVolumeDeviceDir(l.podUID,
|
||||||
utilstrings.EscapeQualifiedName(localVolumePluginName)), lv.volName
|
utilstrings.EscapeQualifiedName(localVolumePluginName)), l.volName
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user