From 14936a7f582be696ede9d85d5099ba43d39afa90 Mon Sep 17 00:00:00 2001 From: Ankit Gohil Date: Wed, 18 Dec 2024 22:01:04 +0000 Subject: [PATCH 1/2] Promote Portworx CSI migration to GA --- pkg/features/versioned_kube_features.go | 3 ++- .../featuregates_linter/test_data/versioned_feature_list.yaml | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/features/versioned_kube_features.go b/pkg/features/versioned_kube_features.go index 5f49f6b3f47..37ead063796 100644 --- a/pkg/features/versioned_kube_features.go +++ b/pkg/features/versioned_kube_features.go @@ -136,7 +136,8 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate CSIMigrationPortworx: { {Version: version.MustParse("1.23"), Default: false, PreRelease: featuregate.Alpha}, {Version: version.MustParse("1.25"), Default: false, PreRelease: featuregate.Beta}, - {Version: version.MustParse("1.31"), Default: true, PreRelease: featuregate.Beta}, // On by default (requires Portworx CSI driver) + {Version: version.MustParse("1.31"), Default: true, PreRelease: featuregate.Beta}, // On by default (requires Portworx CSI driver) + {Version: version.MustParse("1.33"), Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.36 }, CSIVolumeHealth: { diff --git a/test/featuregates_linter/test_data/versioned_feature_list.yaml b/test/featuregates_linter/test_data/versioned_feature_list.yaml index 33f350f70d6..e5add626946 100644 --- a/test/featuregates_linter/test_data/versioned_feature_list.yaml +++ b/test/featuregates_linter/test_data/versioned_feature_list.yaml @@ -362,6 +362,10 @@ lockToDefault: false preRelease: Beta version: "1.31" + - default: true + lockToDefault: true + preRelease: GA + version: "1.33" - name: CSIVolumeHealth versionedSpecs: - default: false From 4aeedcde3b8fad53ef7919a88a8c3d9d066a6402 Mon Sep 17 00:00:00 2001 From: Ankit Gohil Date: Thu, 16 Jan 2025 06:13:49 +0000 Subject: [PATCH 2/2] Fix CSI migration UTs --- pkg/volume/csimigration/plugin_manager_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/volume/csimigration/plugin_manager_test.go b/pkg/volume/csimigration/plugin_manager_test.go index c6df9b586f1..ee7ca9eaf05 100644 --- a/pkg/volume/csimigration/plugin_manager_test.go +++ b/pkg/volume/csimigration/plugin_manager_test.go @@ -21,6 +21,7 @@ import ( "testing" v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/version" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/component-base/featuregate" featuregatetesting "k8s.io/component-base/featuregate/testing" @@ -79,6 +80,8 @@ func TestIsMigratable(t *testing.T) { for _, test := range testCases { pm := NewPluginManager(csiTranslator, utilfeature.DefaultFeatureGate) t.Run(fmt.Sprintf("Testing %v", test.name), func(t *testing.T) { + // TODO: this will be removed in 1.36 + featuregatetesting.SetFeatureGateEmulationVersionDuringTest(t, utilfeature.DefaultFeatureGate, version.MustParse("1.32")) featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, test.pluginFeature, test.pluginFeatureEnabled) migratable, err := pm.IsMigratable(test.spec) if migratable != test.isMigratable { @@ -147,6 +150,8 @@ func TestMigrationFeatureFlagStatus(t *testing.T) { for _, test := range testCases { pm := NewPluginManager(csiTranslator, utilfeature.DefaultFeatureGate) t.Run(fmt.Sprintf("Testing %v", test.name), func(t *testing.T) { + // TODO: this will be removed in 1.36 + featuregatetesting.SetFeatureGateEmulationVersionDuringTest(t, utilfeature.DefaultFeatureGate, version.MustParse("1.32")) if len(test.pluginFeature) > 0 { featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, test.pluginFeature, test.pluginFeatureEnabled) }