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

@@ -34,10 +34,10 @@ import (
"k8s.io/klog"
"k8s.io/kubernetes/pkg/features"
"k8s.io/kubernetes/pkg/util/mount"
"k8s.io/kubernetes/pkg/util/strings"
"k8s.io/kubernetes/pkg/volume"
volutil "k8s.io/kubernetes/pkg/volume/util"
"k8s.io/kubernetes/pkg/volume/util/volumepathhandler"
"k8s.io/utils/strings"
)
var (
@@ -75,7 +75,7 @@ const (
)
func getPath(uid types.UID, volName string, host volume.VolumeHost) string {
return host.GetPodVolumeDir(uid, strings.EscapeQualifiedNameForDisk(rbdPluginName), volName)
return host.GetPodVolumeDir(uid, strings.EscapeQualifiedName(rbdPluginName), volName)
}
func (plugin *rbdPlugin) Init(host volume.VolumeHost) error {
@@ -930,7 +930,7 @@ func (rbd *rbd) rbdGlobalMapPath(spec *volume.Spec) (string, error) {
func (rbd *rbd) rbdPodDeviceMapPath() (string, string) {
name := rbdPluginName
return rbd.plugin.host.GetPodVolumeDeviceDir(rbd.podUID, strings.EscapeQualifiedNameForDisk(name)), rbd.volName
return rbd.plugin.host.GetPodVolumeDeviceDir(rbd.podUID, strings.EscapeQualifiedName(name)), rbd.volName
}
type rbdDiskUnmapper struct {