Update go dependencies to v1.17.0
This commit is contained in:
parent
67dce30ba6
commit
75c3c47f81
516 changed files with 48300 additions and 15154 deletions
48
vendor/k8s.io/kubernetes/pkg/volume/plugins.go
generated
vendored
48
vendor/k8s.io/kubernetes/pkg/volume/plugins.go
generated
vendored
|
|
@ -22,6 +22,10 @@ import (
|
|||
"strings"
|
||||
"sync"
|
||||
|
||||
"k8s.io/klog"
|
||||
"k8s.io/utils/exec"
|
||||
"k8s.io/utils/mount"
|
||||
|
||||
authenticationv1 "k8s.io/api/authentication/v1"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
|
|
@ -32,13 +36,12 @@ import (
|
|||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||
"k8s.io/client-go/informers"
|
||||
clientset "k8s.io/client-go/kubernetes"
|
||||
storagelistersv1 "k8s.io/client-go/listers/storage/v1"
|
||||
storagelisters "k8s.io/client-go/listers/storage/v1beta1"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
"k8s.io/client-go/tools/record"
|
||||
cloudprovider "k8s.io/cloud-provider"
|
||||
"k8s.io/klog"
|
||||
"k8s.io/kubernetes/pkg/features"
|
||||
"k8s.io/kubernetes/pkg/util/mount"
|
||||
"k8s.io/kubernetes/pkg/volume/util/hostutil"
|
||||
"k8s.io/kubernetes/pkg/volume/util/recyclerclient"
|
||||
"k8s.io/kubernetes/pkg/volume/util/subpath"
|
||||
|
|
@ -156,10 +159,6 @@ type VolumePlugin interface {
|
|||
// const.
|
||||
CanSupport(spec *Spec) bool
|
||||
|
||||
// IsMigratedToCSI tests whether a CSIDriver implements this plugin's
|
||||
// functionality
|
||||
IsMigratedToCSI() bool
|
||||
|
||||
// RequiresRemount returns true if this plugin requires mount calls to be
|
||||
// reexecuted. Atomically updating volumes, like Downward API, depend on
|
||||
// this to update the contents of the volume.
|
||||
|
|
@ -350,7 +349,7 @@ type KubeletVolumeHost interface {
|
|||
// to access methods on the Attach Detach Controller.
|
||||
type AttachDetachVolumeHost interface {
|
||||
// CSINodeLister returns the informer lister for the CSINode API Object
|
||||
CSINodeLister() storagelisters.CSINodeLister
|
||||
CSINodeLister() storagelistersv1.CSINodeLister
|
||||
|
||||
// CSIDriverLister returns the informer lister for the CSIDriver API Object
|
||||
CSIDriverLister() storagelisters.CSIDriverLister
|
||||
|
|
@ -436,7 +435,7 @@ type VolumeHost interface {
|
|||
DeleteServiceAccountTokenFunc() func(podUID types.UID)
|
||||
|
||||
// Returns an interface that should be used to execute any utilities in volume plugins
|
||||
GetExec(pluginName string) mount.Exec
|
||||
GetExec(pluginName string) exec.Interface
|
||||
|
||||
// Returns the labels on the node
|
||||
GetNodeLabels() (map[string]string, error)
|
||||
|
|
@ -690,39 +689,6 @@ func (pm *VolumePluginMgr) FindPluginBySpec(spec *Spec) (VolumePlugin, error) {
|
|||
return matches[0], nil
|
||||
}
|
||||
|
||||
// IsPluginMigratableBySpec looks for a plugin that can support a given volume
|
||||
// specification and whether that plugin is Migratable. If no plugins can
|
||||
// support or more than one plugin can support it, return error.
|
||||
func (pm *VolumePluginMgr) IsPluginMigratableBySpec(spec *Spec) (bool, error) {
|
||||
pm.mutex.Lock()
|
||||
defer pm.mutex.Unlock()
|
||||
|
||||
if spec == nil {
|
||||
return false, fmt.Errorf("could not find if plugin is migratable because volume spec is nil")
|
||||
}
|
||||
|
||||
matches := []VolumePlugin{}
|
||||
for _, v := range pm.plugins {
|
||||
if v.CanSupport(spec) {
|
||||
matches = append(matches, v)
|
||||
}
|
||||
}
|
||||
|
||||
if len(matches) == 0 {
|
||||
// Not a known plugin (flex) in which case it is not migratable
|
||||
return false, nil
|
||||
}
|
||||
if len(matches) > 1 {
|
||||
matchedPluginNames := []string{}
|
||||
for _, plugin := range matches {
|
||||
matchedPluginNames = append(matchedPluginNames, plugin.GetPluginName())
|
||||
}
|
||||
return false, fmt.Errorf("multiple volume plugins matched: %s", strings.Join(matchedPluginNames, ","))
|
||||
}
|
||||
|
||||
return matches[0].IsMigratedToCSI(), nil
|
||||
}
|
||||
|
||||
// FindPluginByName fetches a plugin by name or by legacy name. If no plugin
|
||||
// is found, returns error.
|
||||
func (pm *VolumePluginMgr) FindPluginByName(name string) (VolumePlugin, error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue