Skip to content

Commit d37e84c

Browse files
committed
UPSTREAM: <carry>: add CSI migration feature gates for GCE PD and Azure Disk
This commit is the next natural step for commit 2d9a8f9. It introduces custom feature gates to enable the CSI migration in GCE PD and Azure Disk plugins. See openshift/enhancements#549 for details. Stop <carrying> the patch when CSI migration becomes GA (i.e. features.CSIMigrationAzureDisk / features.CSIMigrationGCE are GA).
1 parent b2e08e3 commit d37e84c

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

pkg/features/patch_kube_features.go

+18-4
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,35 @@ import (
88

99
var (
1010
// owner: @jsafrane
11-
// alpha: v1.21
11+
// beta: v1.21
1212
//
1313
// Enables the AWS EBS CSI migration for the Attach/Detach controller (ADC) only.
1414
ADCCSIMigrationAWS featuregate.Feature = "ADC_CSIMigrationAWS"
1515

16+
// owner: @fbertina
17+
// beta: v1.22
18+
//
19+
// Enables the Azure Disk CSI migration for the Attach/Detach controller (ADC) only.
20+
ADCCSIMigrationAzureDisk featuregate.Feature = "ADC_CSIMigrationAzureDisk"
21+
1622
// owner: @jsafrane
17-
// alpha: v1.21
23+
// beta: v1.21
1824
//
1925
// Enables the Cinder CSI migration for the Attach/Detach controller (ADC) only.
2026
ADCCSIMigrationCinder featuregate.Feature = "ADC_CSIMigrationCinder"
27+
28+
// owner: @fbertina
29+
// beta: v1.22
30+
//
31+
// Enables the GCE CSI migration for the Attach/Detach controller (ADC) only.
32+
ADCCSIMigrationGCEPD featuregate.Feature = "ADC_CSIMigrationGCEPD"
2133
)
2234

2335
var ocpDefaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{
24-
ADCCSIMigrationAWS: {Default: true, PreRelease: featuregate.Beta},
25-
ADCCSIMigrationCinder: {Default: true, PreRelease: featuregate.Beta},
36+
ADCCSIMigrationAWS: {Default: true, PreRelease: featuregate.Beta},
37+
ADCCSIMigrationAzureDisk: {Default: true, PreRelease: featuregate.Beta},
38+
ADCCSIMigrationCinder: {Default: true, PreRelease: featuregate.Beta},
39+
ADCCSIMigrationGCEPD: {Default: true, PreRelease: featuregate.Beta},
2640
}
2741

2842
func init() {

pkg/volume/csimigration/patch_adc_plugin_manager.go

+4
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@ func (pm PluginManager) adcIsMigrationEnabledForPlugin(pluginName string) bool {
2626
switch pluginName {
2727
case csilibplugins.AWSEBSInTreePluginName:
2828
return pm.featureGate.Enabled(features.ADCCSIMigrationAWS)
29+
case csilibplugins.AzureDiskInTreePluginName:
30+
return pm.featureGate.Enabled(features.ADCCSIMigrationAzureDisk)
2931
case csilibplugins.CinderInTreePluginName:
3032
return pm.featureGate.Enabled(features.ADCCSIMigrationCinder)
33+
case csilibplugins.GCEPDInTreePluginName:
34+
return pm.featureGate.Enabled(features.ADCCSIMigrationGCEPD)
3135
default:
3236
return pm.isMigrationEnabledForPlugin(pluginName)
3337
}

0 commit comments

Comments
 (0)