Skip to content

Commit

Permalink
Merge pull request #124546 from carlory/remove-rbd
Browse files Browse the repository at this point in the history
CephRBD volume plugin and its csi migration support are removed
  • Loading branch information
k8s-ci-robot committed May 10, 2024
2 parents db82fd1 + c8e91b9 commit df074ed
Show file tree
Hide file tree
Showing 24 changed files with 8 additions and 4,305 deletions.
2 changes: 0 additions & 2 deletions cmd/kube-controller-manager/app/plugins_providers.go
Expand Up @@ -24,7 +24,6 @@ import (
"k8s.io/kubernetes/pkg/volume"
"k8s.io/kubernetes/pkg/volume/csimigration"
"k8s.io/kubernetes/pkg/volume/portworx"
"k8s.io/kubernetes/pkg/volume/rbd"
)

type probeFn func() []volume.VolumePlugin
Expand Down Expand Up @@ -57,7 +56,6 @@ type pluginInfo struct {
func appendAttachableLegacyProviderVolumes(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}
pluginMigrationStatus[plugins.RBDVolumePluginName] = pluginInfo{pluginMigrationFeature: features.CSIMigrationRBD, pluginUnregisterFeature: features.InTreePluginRBDUnregister, pluginProbeFunction: rbd.ProbeVolumePlugins}
var err error
for pluginName, pluginInfo := range pluginMigrationStatus {
allPlugins, err = appendPluginBasedOnFeatureFlags(logger, allPlugins, pluginName, featureGate, pluginInfo)
Expand Down
2 changes: 0 additions & 2 deletions cmd/kubelet/app/plugins_providers.go
Expand Up @@ -24,7 +24,6 @@ import (
"k8s.io/kubernetes/pkg/volume"
"k8s.io/kubernetes/pkg/volume/csimigration"
"k8s.io/kubernetes/pkg/volume/portworx"
"k8s.io/kubernetes/pkg/volume/rbd"
)

type probeFn func() []volume.VolumePlugin
Expand Down Expand Up @@ -57,7 +56,6 @@ type pluginInfo struct {
func appendLegacyProviderVolumes(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}
pluginMigrationStatus[plugins.RBDVolumePluginName] = pluginInfo{pluginMigrationFeature: features.CSIMigrationRBD, pluginUnregisterFeature: features.InTreePluginRBDUnregister, pluginProbeFunction: rbd.ProbeVolumePlugins}
var err error
for pluginName, pluginInfo := range pluginMigrationStatus {
allPlugins, err = appendPluginBasedOnFeatureFlags(allPlugins, pluginName, featureGate, pluginInfo)
Expand Down
18 changes: 0 additions & 18 deletions pkg/features/kube_features.go
Expand Up @@ -141,13 +141,6 @@ const (
// Enables the Portworx in-tree driver to Portworx migration feature.
CSIMigrationPortworx featuregate.Feature = "CSIMigrationPortworx"

// owner: @humblec
// alpha: v1.23
// deprecated: v1.28
//
// Enables the RBD in-tree driver to RBD CSI Driver migration feature.
CSIMigrationRBD featuregate.Feature = "CSIMigrationRBD"

// owner: @fengzixu
// alpha: v1.21
//
Expand Down Expand Up @@ -305,13 +298,6 @@ const (
// Disables the Portworx in-tree driver.
InTreePluginPortworxUnregister featuregate.Feature = "InTreePluginPortworxUnregister"

// owner: @humblec
// alpha: v1.23
// deprecated: v1.28
//
// Disables the RBD in-tree driver.
InTreePluginRBDUnregister featuregate.Feature = "InTreePluginRBDUnregister"

// owner: @divyenpatel
// alpha: v1.21
//
Expand Down Expand Up @@ -996,8 +982,6 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS

CSIMigrationPortworx: {Default: false, PreRelease: featuregate.Beta}, // Off by default (requires Portworx CSI driver)

CSIMigrationRBD: {Default: false, PreRelease: featuregate.Deprecated}, // deprecated in 1.28, remove in 1.31

CSIVolumeHealth: {Default: false, PreRelease: featuregate.Alpha},

CloudControllerManagerWebhook: {Default: false, PreRelease: featuregate.Alpha},
Expand Down Expand Up @@ -1044,8 +1028,6 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS

InTreePluginPortworxUnregister: {Default: false, PreRelease: featuregate.Alpha},

InTreePluginRBDUnregister: {Default: false, PreRelease: featuregate.Deprecated}, // deprecated in 1.28, remove in 1.31

InTreePluginvSphereUnregister: {Default: false, PreRelease: featuregate.Alpha},

JobBackoffLimitPerIndex: {Default: true, PreRelease: featuregate.Beta},
Expand Down
2 changes: 0 additions & 2 deletions pkg/kubemark/hollow_kubelet.go
Expand Up @@ -55,7 +55,6 @@ import (
"k8s.io/kubernetes/pkg/volume/nfs"
"k8s.io/kubernetes/pkg/volume/portworx"
"k8s.io/kubernetes/pkg/volume/projected"
"k8s.io/kubernetes/pkg/volume/rbd"
"k8s.io/kubernetes/pkg/volume/secret"
"k8s.io/kubernetes/pkg/volume/util/hostutil"
"k8s.io/kubernetes/pkg/volume/util/subpath"
Expand All @@ -76,7 +75,6 @@ func volumePlugins() []volume.VolumePlugin {
allPlugins = append(allPlugins, nfs.ProbeVolumePlugins(volume.VolumeConfig{})...)
allPlugins = append(allPlugins, secret.ProbeVolumePlugins()...)
allPlugins = append(allPlugins, iscsi.ProbeVolumePlugins()...)
allPlugins = append(allPlugins, rbd.ProbeVolumePlugins()...)
allPlugins = append(allPlugins, cephfs.ProbeVolumePlugins()...)
allPlugins = append(allPlugins, downwardapi.ProbeVolumePlugins()...)
allPlugins = append(allPlugins, fc.ProbeVolumePlugins()...)
Expand Down
4 changes: 0 additions & 4 deletions pkg/scheduler/framework/plugins/nodevolumelimits/utils.go
Expand Up @@ -51,10 +51,6 @@ func isCSIMigrationOn(csiNode *storagev1.CSINode, pluginName string) bool {
return true
case csilibplugins.CinderInTreePluginName:
return true
case csilibplugins.RBDVolumePluginName:
if !utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationRBD) {
return false
}
default:
return false
}
Expand Down
2 changes: 0 additions & 2 deletions pkg/scheduler/framework/plugins/volumebinding/binder.go
Expand Up @@ -1100,8 +1100,6 @@ func isCSIMigrationOnForPlugin(pluginName string) bool {
return true
case csiplugins.PortworxVolumePluginName:
return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationPortworx)
case csiplugins.RBDVolumePluginName:
return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationRBD)
}
return false
}
Expand Down
3 changes: 0 additions & 3 deletions pkg/volume/csi/csi_plugin.go
Expand Up @@ -250,9 +250,6 @@ func (p *csiPlugin) Init(host volume.VolumeHost) error {
csitranslationplugins.PortworxVolumePluginName: func() bool {
return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationPortworx)
},
csitranslationplugins.RBDVolumePluginName: func() bool {
return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationRBD)
},
}

// Initializing the label management channels
Expand Down
4 changes: 0 additions & 4 deletions pkg/volume/csimigration/plugin_manager.go
Expand Up @@ -74,8 +74,6 @@ func (pm PluginManager) IsMigrationCompleteForPlugin(pluginName string) bool {
return pm.featureGate.Enabled(features.InTreePluginvSphereUnregister)
case csilibplugins.PortworxVolumePluginName:
return pm.featureGate.Enabled(features.InTreePluginPortworxUnregister)
case csilibplugins.RBDVolumePluginName:
return pm.featureGate.Enabled(features.InTreePluginRBDUnregister)
default:
return false
}
Expand All @@ -102,8 +100,6 @@ func (pm PluginManager) IsMigrationEnabledForPlugin(pluginName string) bool {
return true
case csilibplugins.PortworxVolumePluginName:
return pm.featureGate.Enabled(features.CSIMigrationPortworx)
case csilibplugins.RBDVolumePluginName:
return pm.featureGate.Enabled(features.CSIMigrationRBD)
default:
return false
}
Expand Down
16 changes: 8 additions & 8 deletions pkg/volume/csimigration/plugin_manager_test.go
Expand Up @@ -39,35 +39,35 @@ func TestIsMigratable(t *testing.T) {
spec *volume.Spec
}{
{
name: "RBD PV source with CSIMigrationGCE enabled",
pluginFeature: features.CSIMigrationRBD,
name: "Portworx PV source with CSIMigrationPortworx enabled",
pluginFeature: features.CSIMigrationPortworx,
pluginFeatureEnabled: true,
isMigratable: true,
csiMigrationEnabled: true,
spec: &volume.Spec{
PersistentVolume: &v1.PersistentVolume{
Spec: v1.PersistentVolumeSpec{
PersistentVolumeSource: v1.PersistentVolumeSource{
RBD: &v1.RBDPersistentVolumeSource{
RBDImage: "test-disk",
PortworxVolume: &v1.PortworxVolumeSource{
VolumeID: "test-volume",
},
},
},
},
},
},
{
name: "RBD PD PV Source with CSIMigrationGCE disabled",
pluginFeature: features.CSIMigrationRBD,
name: "Portworx PD PV Source with CSIMigrationPortworx disabled",
pluginFeature: features.CSIMigrationPortworx,
pluginFeatureEnabled: false,
isMigratable: false,
csiMigrationEnabled: true,
spec: &volume.Spec{
PersistentVolume: &v1.PersistentVolume{
Spec: v1.PersistentVolumeSpec{
PersistentVolumeSource: v1.PersistentVolumeSource{
RBD: &v1.RBDPersistentVolumeSource{
RBDImage: "test-disk",
PortworxVolume: &v1.PortworxVolumeSource{
VolumeID: "test-volume",
},
},
},
Expand Down
15 changes: 0 additions & 15 deletions pkg/volume/rbd/OWNERS

This file was deleted.

0 comments on commit df074ed

Please sign in to comment.