diff --git a/cmd/kube-controller-manager/app/plugins.go b/cmd/kube-controller-manager/app/plugins.go index f87adc251d5..b9f5fe132cf 100644 --- a/cmd/kube-controller-manager/app/plugins.go +++ b/cmd/kube-controller-manager/app/plugins.go @@ -45,12 +45,7 @@ import ( // The list of plugins is manually compiled. This code and the plugin // initialization code for kubelet really, really need a through refactor. func ProbeAttachableVolumePlugins(logger klog.Logger) ([]volume.VolumePlugin, error) { - var err error allPlugins := []volume.VolumePlugin{} - allPlugins, err = appendAttachableLegacyProviderVolumes(logger, allPlugins, utilfeature.DefaultFeatureGate) - if err != nil { - return allPlugins, err - } allPlugins = append(allPlugins, fc.ProbeVolumePlugins()...) allPlugins = append(allPlugins, iscsi.ProbeVolumePlugins()...) allPlugins = append(allPlugins, csi.ProbeVolumePlugins()...) diff --git a/cmd/kube-controller-manager/app/plugins_providers.go b/cmd/kube-controller-manager/app/plugins_providers.go index 587a02dc9bf..cd0f1a1a8d4 100644 --- a/cmd/kube-controller-manager/app/plugins_providers.go +++ b/cmd/kube-controller-manager/app/plugins_providers.go @@ -53,7 +53,7 @@ type pluginInfo struct { pluginProbeFunction probeFn } -func appendAttachableLegacyProviderVolumes(logger klog.Logger, allPlugins []volume.VolumePlugin, featureGate featuregate.FeatureGate) ([]volume.VolumePlugin, error) { +func appendExpandableLegacyProviderVolumes(logger klog.Logger, allPlugins []volume.VolumePlugin, featureGate featuregate.FeatureGate) ([]volume.VolumePlugin, error) { pluginMigrationStatus := make(map[string]pluginInfo) pluginMigrationStatus[plugins.PortworxVolumePluginName] = pluginInfo{pluginMigrationFeature: features.CSIMigrationPortworx, pluginUnregisterFeature: features.InTreePluginPortworxUnregister, pluginProbeFunction: portworx.ProbeVolumePlugins} var err error @@ -65,11 +65,3 @@ func appendAttachableLegacyProviderVolumes(logger klog.Logger, allPlugins []volu } return allPlugins, nil } - -func appendExpandableLegacyProviderVolumes(logger klog.Logger, allPlugins []volume.VolumePlugin, featureGate featuregate.FeatureGate) ([]volume.VolumePlugin, error) { - return appendLegacyProviderVolumes(logger, allPlugins, featureGate) -} - -func appendLegacyProviderVolumes(logger klog.Logger, allPlugins []volume.VolumePlugin, featureGate featuregate.FeatureGate) ([]volume.VolumePlugin, error) { - return appendAttachableLegacyProviderVolumes(logger, allPlugins, featureGate) -} diff --git a/cmd/kube-controller-manager/app/plugins_test.go b/cmd/kube-controller-manager/app/plugins_test.go index 83f3ba6ee63..63c4abebade 100644 --- a/cmd/kube-controller-manager/app/plugins_test.go +++ b/cmd/kube-controller-manager/app/plugins_test.go @@ -44,7 +44,7 @@ func TestProbeAttachableVolumePlugins(t *testing.T) { if err != nil { t.Fatalf("ProbeAttachableVolumePlugins failed: %s", err) } - checkPlugins(t, plugins, []string{"kubernetes.io/csi", "kubernetes.io/fc", "kubernetes.io/iscsi", "kubernetes.io/portworx-volume"}) + checkPlugins(t, plugins, []string{"kubernetes.io/csi", "kubernetes.io/fc", "kubernetes.io/iscsi"}) } func TestProbeExpandableVolumePlugins(t *testing.T) {