vendor: bump to kube 1.10/master
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
a85ea609db
commit
f317ffce5b
535 changed files with 52955 additions and 17528 deletions
61
vendor/k8s.io/kubernetes/pkg/volume/plugins.go
generated
vendored
61
vendor/k8s.io/kubernetes/pkg/volume/plugins.go
generated
vendored
|
@ -208,6 +208,26 @@ type ExpandableVolumePlugin interface {
|
|||
RequiresFSResize() bool
|
||||
}
|
||||
|
||||
// BlockVolumePlugin is an extend interface of VolumePlugin and is used for block volumes support.
|
||||
type BlockVolumePlugin interface {
|
||||
VolumePlugin
|
||||
// NewBlockVolumeMapper creates a new volume.BlockVolumeMapper from an API specification.
|
||||
// Ownership of the spec pointer in *not* transferred.
|
||||
// - spec: The v1.Volume spec
|
||||
// - pod: The enclosing pod
|
||||
NewBlockVolumeMapper(spec *Spec, podRef *v1.Pod, opts VolumeOptions) (BlockVolumeMapper, error)
|
||||
// NewBlockVolumeUnmapper creates a new volume.BlockVolumeUnmapper from recoverable state.
|
||||
// - name: The volume name, as per the v1.Volume spec.
|
||||
// - podUID: The UID of the enclosing pod
|
||||
NewBlockVolumeUnmapper(name string, podUID types.UID) (BlockVolumeUnmapper, error)
|
||||
// ConstructBlockVolumeSpec constructs a volume spec based on the given
|
||||
// podUID, volume name and a pod device map path.
|
||||
// The spec may have incomplete information due to limited information
|
||||
// from input. This function is used by volume manager to reconstruct
|
||||
// volume spec by reading the volume directories from disk.
|
||||
ConstructBlockVolumeSpec(podUID types.UID, volumeName, mountPath string) (*Spec, error)
|
||||
}
|
||||
|
||||
// VolumeHost is an interface that plugins can use to access the kubelet.
|
||||
type VolumeHost interface {
|
||||
// GetPluginDir returns the absolute path to a directory under which
|
||||
|
@ -216,6 +236,11 @@ type VolumeHost interface {
|
|||
// GetPodPluginDir().
|
||||
GetPluginDir(pluginName string) string
|
||||
|
||||
// GetVolumeDevicePluginDir returns the absolute path to a directory
|
||||
// under which a given plugin may store data.
|
||||
// ex. plugins/kubernetes.io/{PluginName}/{DefaultKubeletVolumeDevicesDirName}/{volumePluginDependentPath}/
|
||||
GetVolumeDevicePluginDir(pluginName string) string
|
||||
|
||||
// GetPodVolumeDir returns the absolute path a directory which
|
||||
// represents the named volume under the named plugin for the given
|
||||
// pod. If the specified pod does not exist, the result of this call
|
||||
|
@ -228,6 +253,13 @@ type VolumeHost interface {
|
|||
// directory might not actually exist on disk yet.
|
||||
GetPodPluginDir(podUID types.UID, pluginName string) string
|
||||
|
||||
// GetPodVolumeDeviceDir returns the absolute path a directory which
|
||||
// represents the named plugin for the given pod.
|
||||
// If the specified pod does not exist, the result of this call
|
||||
// might not exist.
|
||||
// ex. pods/{podUid}/{DefaultKubeletVolumeDevicesDirName}/{escapeQualifiedPluginName}/
|
||||
GetPodVolumeDeviceDir(podUID types.UID, pluginName string) string
|
||||
|
||||
// GetKubeClient returns a client interface
|
||||
GetKubeClient() clientset.Interface
|
||||
|
||||
|
@ -271,6 +303,9 @@ type VolumeHost interface {
|
|||
|
||||
// Returns the labels on the node
|
||||
GetNodeLabels() (map[string]string, error)
|
||||
|
||||
// Returns the name of the node
|
||||
GetNodeName() types.NodeName
|
||||
}
|
||||
|
||||
// VolumePluginMgr tracks registered plugins.
|
||||
|
@ -675,6 +710,32 @@ func (pm *VolumePluginMgr) FindExpandablePluginByName(name string) (ExpandableVo
|
|||
return nil, nil
|
||||
}
|
||||
|
||||
// FindMapperPluginBySpec fetches a block volume plugin by spec.
|
||||
func (pm *VolumePluginMgr) FindMapperPluginBySpec(spec *Spec) (BlockVolumePlugin, error) {
|
||||
volumePlugin, err := pm.FindPluginBySpec(spec)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if blockVolumePlugin, ok := volumePlugin.(BlockVolumePlugin); ok {
|
||||
return blockVolumePlugin, nil
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// FindMapperPluginByName fetches a block volume plugin by name.
|
||||
func (pm *VolumePluginMgr) FindMapperPluginByName(name string) (BlockVolumePlugin, error) {
|
||||
volumePlugin, err := pm.FindPluginByName(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if blockVolumePlugin, ok := volumePlugin.(BlockVolumePlugin); ok {
|
||||
return blockVolumePlugin, nil
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// NewPersistentVolumeRecyclerPodTemplate creates a template for a recycler
|
||||
// pod. By default, a recycler pod simply runs "rm -rf" on a volume and tests
|
||||
// for emptiness. Most attributes of the template will be correct for most
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue