migrate to k8s.io/utils/strings

This commit is contained in:
danielqsj
2019-01-29 17:50:53 +08:00
parent df7e4f3d49
commit 093328e57f
75 changed files with 164 additions and 173 deletions

View File

@@ -26,10 +26,10 @@ import (
"k8s.io/apimachinery/pkg/types"
"k8s.io/klog"
"k8s.io/kubernetes/pkg/util/mount"
kstrings "k8s.io/kubernetes/pkg/util/strings"
"k8s.io/kubernetes/pkg/volume"
"k8s.io/kubernetes/pkg/volume/util"
"k8s.io/kubernetes/pkg/volume/util/volumepathhandler"
utilsstrings "k8s.io/utils/strings"
)
var _ volume.VolumePlugin = &gcePersistentDiskPlugin{}
@@ -170,5 +170,5 @@ func (pd *gcePersistentDisk) GetGlobalMapPath(spec *volume.Spec) (string, error)
// path: pods/{podUid}/volumeDevices/kubernetes.io~aws
func (pd *gcePersistentDisk) GetPodDeviceMapPath() (string, string) {
name := gcePersistentDiskPluginName
return pd.plugin.host.GetPodVolumeDeviceDir(pd.podUID, kstrings.EscapeQualifiedNameForDisk(name)), pd.volName
return pd.plugin.host.GetPodVolumeDeviceDir(pd.podUID, utilsstrings.EscapeQualifiedName(name)), pd.volName
}