Skip to content

Commit e4d66c1

Browse files
bertinattosoltysh
authored andcommitted
UPSTREAM: <carry>: add CSI migration feature gates for vSphere and Azure File
This commit is the next natural step for commits 2d9a8f9 and d37e84c. It introduces custom feature gates to enable the CSI migration in vSphere and Azure File plugins. See openshift/enhancements#549 for details. Stop <carrying> the patch when CSI migration becomes GA (i.e. features.CSIMigrationAzureFile / features.CSIMigrationVSphere are GA). openshift-rebase(v1.24):source=2701d71abb4 UPSTREAM: <carry>: Skip in-tree topology tests win Azure Disk migrated to CSI Skip test that depend on in-tree Azure Disk volume plugin that (wrongly) uses failure domains for value of "topology.kubernetes.io/zone" label in Azure regions that don't have availability zones. Our e2e tests blindly use that label and expect that a volume provisioned in such a "zone" can be used only by nodes in that "zone" (= topology domain). This is false, Azure Disk CSI driver can use such a volume in any zone and therefore the test may randomly fail. See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2066865 openshift-rebase(v1.24):source=7871e95298a
1 parent aff4434 commit e4d66c1

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

openshift-hack/e2e/annotate/rules.go

+4
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ var (
151151
},
152152
"[Skipped:azure]": {
153153
"Networking should provide Internet connection for containers", // Azure does not allow ICMP traffic to internet.
154+
// Azure CSI migration changed how we treat regions without zones.
155+
// See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2066865
156+
`\[sig-storage\] In-tree Volumes \[Driver: azure-disk\] \[Testpattern: Dynamic PV \(immediate binding\)\] topology should provision a volume and schedule a pod with AllowedTopologies`,
157+
`\[sig-storage\] In-tree Volumes \[Driver: azure-disk\] \[Testpattern: Dynamic PV \(delayed binding\)\] topology should provision a volume and schedule a pod with AllowedTopologies`,
154158
},
155159
"[Skipped:gce]": {
156160
// Requires creation of a different compute instance in a different zone and is not compatible with volumeBindingMode of WaitForFirstConsumer which we use in 4.x

pkg/features/patch_kube_features.go

+14
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ var (
1919
// Enables the Azure Disk CSI migration for the Attach/Detach controller (ADC) only.
2020
ADCCSIMigrationAzureDisk featuregate.Feature = "ADC_CSIMigrationAzureDisk"
2121

22+
// owner: @fbertina
23+
// beta: v1.23
24+
//
25+
// Enables the Azure File CSI migration for the Attach/Detach controller (ADC) only.
26+
ADCCSIMigrationAzureFile featuregate.Feature = "ADC_CSIMigrationAzureFile"
27+
2228
// owner: @jsafrane
2329
// beta: v1.21
2430
//
@@ -30,13 +36,21 @@ var (
3036
//
3137
// Enables the GCE CSI migration for the Attach/Detach controller (ADC) only.
3238
ADCCSIMigrationGCEPD featuregate.Feature = "ADC_CSIMigrationGCEPD"
39+
40+
// owner: @fbertina
41+
// beta: v1.23
42+
//
43+
// Enables the vSphere CSI migration for the Attach/Detach controller (ADC) only.
44+
ADCCSIMigrationVSphere featuregate.Feature = "ADC_CSIMigrationVSphere"
3345
)
3446

3547
var ocpDefaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{
3648
ADCCSIMigrationAWS: {Default: true, PreRelease: featuregate.Beta},
3749
ADCCSIMigrationAzureDisk: {Default: true, PreRelease: featuregate.Beta},
50+
ADCCSIMigrationAzureFile: {Default: true, PreRelease: featuregate.Beta},
3851
ADCCSIMigrationCinder: {Default: true, PreRelease: featuregate.Beta},
3952
ADCCSIMigrationGCEPD: {Default: true, PreRelease: featuregate.Beta},
53+
ADCCSIMigrationVSphere: {Default: true, PreRelease: featuregate.Beta},
4054
}
4155

4256
func init() {

pkg/volume/csimigration/patch_adc_plugin_manager.go

+4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,14 @@ func (pm PluginManager) adcIsMigrationEnabledForPlugin(pluginName string) bool {
2828
return pm.featureGate.Enabled(features.ADCCSIMigrationAWS)
2929
case csilibplugins.AzureDiskInTreePluginName:
3030
return pm.featureGate.Enabled(features.ADCCSIMigrationAzureDisk)
31+
case csilibplugins.AzureFileInTreePluginName:
32+
return pm.featureGate.Enabled(features.ADCCSIMigrationAzureFile)
3133
case csilibplugins.CinderInTreePluginName:
3234
return pm.featureGate.Enabled(features.ADCCSIMigrationCinder)
3335
case csilibplugins.GCEPDInTreePluginName:
3436
return pm.featureGate.Enabled(features.ADCCSIMigrationGCEPD)
37+
case csilibplugins.VSphereInTreePluginName:
38+
return pm.featureGate.Enabled(features.ADCCSIMigrationVSphere)
3539
default:
3640
return pm.isMigrationEnabledForPlugin(pluginName)
3741
}

0 commit comments

Comments
 (0)