Add AnyVolumeDataSource feature gate
Allow any custom resource to be the data source of a PVC, if the AnyVolumeDataSource feature gate is enabled. This is an alpha feature.
This commit is contained in:
@@ -47,6 +47,10 @@ func dataSourceInUse(oldPVCSpec *core.PersistentVolumeClaimSpec) bool {
|
||||
|
||||
func dataSourceIsEnabled(pvcSpec *core.PersistentVolumeClaimSpec) bool {
|
||||
if pvcSpec.DataSource != nil {
|
||||
if utilfeature.DefaultFeatureGate.Enabled(features.AnyVolumeDataSource) {
|
||||
return true
|
||||
}
|
||||
|
||||
apiGroup := ""
|
||||
if pvcSpec.DataSource.APIGroup != nil {
|
||||
apiGroup = *pvcSpec.DataSource.APIGroup
|
||||
|
Reference in New Issue
Block a user