mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
revert interface check
This commit is contained in:
parent
bf9c829e34
commit
7a7c8d1ec9
@ -43,13 +43,13 @@ type awsElasticBlockStoreAttacher struct {
|
|||||||
awsVolumes aws.Volumes
|
awsVolumes aws.Volumes
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ volume.Attacher = (*awsElasticBlockStoreAttacher)(nil)
|
var _ volume.Attacher = &awsElasticBlockStoreAttacher{}
|
||||||
|
|
||||||
var _ volume.DeviceMounter = (*awsElasticBlockStoreAttacher)(nil)
|
var _ volume.DeviceMounter = &awsElasticBlockStoreAttacher{}
|
||||||
|
|
||||||
var _ volume.AttachableVolumePlugin = (*awsElasticBlockStorePlugin)(nil)
|
var _ volume.AttachableVolumePlugin = &awsElasticBlockStorePlugin{}
|
||||||
|
|
||||||
var _ volume.DeviceMountableVolumePlugin = (*awsElasticBlockStorePlugin)(nil)
|
var _ volume.DeviceMountableVolumePlugin = &awsElasticBlockStorePlugin{}
|
||||||
|
|
||||||
func (plugin *awsElasticBlockStorePlugin) NewAttacher() (volume.Attacher, error) {
|
func (plugin *awsElasticBlockStorePlugin) NewAttacher() (volume.Attacher, error) {
|
||||||
awsCloud, err := getCloudProvider(plugin.host.GetCloudProvider())
|
awsCloud, err := getCloudProvider(plugin.host.GetCloudProvider())
|
||||||
@ -255,9 +255,9 @@ type awsElasticBlockStoreDetacher struct {
|
|||||||
awsVolumes aws.Volumes
|
awsVolumes aws.Volumes
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ volume.Detacher = (*awsElasticBlockStoreDetacher)(nil)
|
var _ volume.Detacher = &awsElasticBlockStoreDetacher{}
|
||||||
|
|
||||||
var _ volume.DeviceUnmounter = (*awsElasticBlockStoreDetacher)(nil)
|
var _ volume.DeviceUnmounter = &awsElasticBlockStoreDetacher{}
|
||||||
|
|
||||||
func (plugin *awsElasticBlockStorePlugin) NewDetacher() (volume.Detacher, error) {
|
func (plugin *awsElasticBlockStorePlugin) NewDetacher() (volume.Detacher, error) {
|
||||||
awsCloud, err := getCloudProvider(plugin.host.GetCloudProvider())
|
awsCloud, err := getCloudProvider(plugin.host.GetCloudProvider())
|
||||||
|
@ -51,10 +51,10 @@ type awsElasticBlockStorePlugin struct {
|
|||||||
host volume.VolumeHost
|
host volume.VolumeHost
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ volume.VolumePlugin = (*awsElasticBlockStorePlugin)(nil)
|
var _ volume.VolumePlugin = &awsElasticBlockStorePlugin{}
|
||||||
var _ volume.PersistentVolumePlugin = (*awsElasticBlockStorePlugin)(nil)
|
var _ volume.PersistentVolumePlugin = &awsElasticBlockStorePlugin{}
|
||||||
var _ volume.DeletableVolumePlugin = (*awsElasticBlockStorePlugin)(nil)
|
var _ volume.DeletableVolumePlugin = &awsElasticBlockStorePlugin{}
|
||||||
var _ volume.ProvisionableVolumePlugin = (*awsElasticBlockStorePlugin)(nil)
|
var _ volume.ProvisionableVolumePlugin = &awsElasticBlockStorePlugin{}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
awsElasticBlockStorePluginName = "kubernetes.io/aws-ebs"
|
awsElasticBlockStorePluginName = "kubernetes.io/aws-ebs"
|
||||||
@ -311,9 +311,9 @@ func (plugin *awsElasticBlockStorePlugin) NodeExpand(resizeOptions volume.NodeRe
|
|||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ volume.NodeExpandableVolumePlugin = (*awsElasticBlockStorePlugin)(nil)
|
var _ volume.NodeExpandableVolumePlugin = &awsElasticBlockStorePlugin{}
|
||||||
var _ volume.ExpandableVolumePlugin = (*awsElasticBlockStorePlugin)(nil)
|
var _ volume.ExpandableVolumePlugin = &awsElasticBlockStorePlugin{}
|
||||||
var _ volume.VolumePluginWithAttachLimits = (*awsElasticBlockStorePlugin)(nil)
|
var _ volume.VolumePluginWithAttachLimits = &awsElasticBlockStorePlugin{}
|
||||||
|
|
||||||
// Abstract interface to PD operations.
|
// Abstract interface to PD operations.
|
||||||
type ebsManager interface {
|
type ebsManager interface {
|
||||||
@ -350,7 +350,7 @@ type awsElasticBlockStoreMounter struct {
|
|||||||
mountOptions []string
|
mountOptions []string
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ volume.Mounter = (*awsElasticBlockStoreMounter)(nil)
|
var _ volume.Mounter = &awsElasticBlockStoreMounter{}
|
||||||
|
|
||||||
func (b *awsElasticBlockStoreMounter) GetAttributes() volume.Attributes {
|
func (b *awsElasticBlockStoreMounter) GetAttributes() volume.Attributes {
|
||||||
return volume.Attributes{
|
return volume.Attributes{
|
||||||
@ -448,7 +448,7 @@ type awsElasticBlockStoreUnmounter struct {
|
|||||||
*awsElasticBlockStore
|
*awsElasticBlockStore
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ volume.Unmounter = (*awsElasticBlockStoreUnmounter)(nil)
|
var _ volume.Unmounter = &awsElasticBlockStoreUnmounter{}
|
||||||
|
|
||||||
// Unmounts the bind mount, and detaches the disk only if the PD
|
// Unmounts the bind mount, and detaches the disk only if the PD
|
||||||
// resource was the last reference to that disk on the kubelet.
|
// resource was the last reference to that disk on the kubelet.
|
||||||
@ -465,7 +465,7 @@ type awsElasticBlockStoreDeleter struct {
|
|||||||
*awsElasticBlockStore
|
*awsElasticBlockStore
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ volume.Deleter = (*awsElasticBlockStoreDeleter)(nil)
|
var _ volume.Deleter = &awsElasticBlockStoreDeleter{}
|
||||||
|
|
||||||
func (d *awsElasticBlockStoreDeleter) GetPath() string {
|
func (d *awsElasticBlockStoreDeleter) GetPath() string {
|
||||||
return getPath(d.podUID, d.volName, d.plugin.host)
|
return getPath(d.podUID, d.volName, d.plugin.host)
|
||||||
@ -480,7 +480,7 @@ type awsElasticBlockStoreProvisioner struct {
|
|||||||
options volume.VolumeOptions
|
options volume.VolumeOptions
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ volume.Provisioner = (*awsElasticBlockStoreProvisioner)(nil)
|
var _ volume.Provisioner = &awsElasticBlockStoreProvisioner{}
|
||||||
|
|
||||||
func (c *awsElasticBlockStoreProvisioner) Provision(selectedNode *v1.Node, allowedTopologies []v1.TopologySelectorTerm) (*v1.PersistentVolume, error) {
|
func (c *awsElasticBlockStoreProvisioner) Provision(selectedNode *v1.Node, allowedTopologies []v1.TopologySelectorTerm) (*v1.PersistentVolume, error) {
|
||||||
if !util.ContainsAllAccessModes(c.plugin.GetAccessModes(), c.options.PVC.Spec.AccessModes) {
|
if !util.ContainsAllAccessModes(c.plugin.GetAccessModes(), c.options.PVC.Spec.AccessModes) {
|
||||||
@ -534,10 +534,10 @@ func (c *awsElasticBlockStoreProvisioner) Provision(selectedNode *v1.Node, allow
|
|||||||
pv.Spec.AccessModes = c.plugin.GetAccessModes()
|
pv.Spec.AccessModes = c.plugin.GetAccessModes()
|
||||||
}
|
}
|
||||||
|
|
||||||
requirements := make([]v1.NodeSelectorRequirement, 0)
|
requirements := make([]v1.NodeSelectorRequirement, 0, len(labels))
|
||||||
if len(labels) != 0 {
|
if len(labels) != 0 {
|
||||||
if pv.Labels == nil {
|
if pv.Labels == nil {
|
||||||
pv.Labels = make(map[string]string)
|
pv.Labels = make(map[string]string, len(labels))
|
||||||
}
|
}
|
||||||
for k, v := range labels {
|
for k, v := range labels {
|
||||||
pv.Labels[k] = v
|
pv.Labels[k] = v
|
||||||
|
@ -37,7 +37,7 @@ import (
|
|||||||
"k8s.io/legacy-cloud-providers/aws"
|
"k8s.io/legacy-cloud-providers/aws"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ volume.BlockVolumePlugin = (*awsElasticBlockStorePlugin)(nil)
|
var _ volume.BlockVolumePlugin = &awsElasticBlockStorePlugin{}
|
||||||
|
|
||||||
func (plugin *awsElasticBlockStorePlugin) ConstructBlockVolumeSpec(podUID types.UID, volumeName, mapPath string) (*volume.Spec, error) {
|
func (plugin *awsElasticBlockStorePlugin) ConstructBlockVolumeSpec(podUID types.UID, volumeName, mapPath string) (*volume.Spec, error) {
|
||||||
pluginDir := plugin.host.GetVolumeDevicePluginDir(awsElasticBlockStorePluginName)
|
pluginDir := plugin.host.GetVolumeDevicePluginDir(awsElasticBlockStorePluginName)
|
||||||
@ -145,14 +145,14 @@ type awsElasticBlockStoreUnmapper struct {
|
|||||||
*awsElasticBlockStore
|
*awsElasticBlockStore
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ volume.BlockVolumeUnmapper = (*awsElasticBlockStoreUnmapper)(nil)
|
var _ volume.BlockVolumeUnmapper = &awsElasticBlockStoreUnmapper{}
|
||||||
|
|
||||||
type awsElasticBlockStoreMapper struct {
|
type awsElasticBlockStoreMapper struct {
|
||||||
*awsElasticBlockStore
|
*awsElasticBlockStore
|
||||||
readOnly bool
|
readOnly bool
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ volume.BlockVolumeMapper = (*awsElasticBlockStoreMapper)(nil)
|
var _ volume.BlockVolumeMapper = &awsElasticBlockStoreMapper{}
|
||||||
|
|
||||||
// GetGlobalMapPath returns global map path and error
|
// GetGlobalMapPath returns global map path and error
|
||||||
// path: plugins/kubernetes.io/{PluginName}/volumeDevices/volumeID
|
// path: plugins/kubernetes.io/{PluginName}/volumeDevices/volumeID
|
||||||
|
Loading…
Reference in New Issue
Block a user