mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
combine feature gate VolumeScheduling and DynamicProvisioningScheduling into one
This commit is contained in:
@@ -68,16 +68,14 @@ type StorageClass struct {
|
||||
|
||||
// VolumeBindingMode indicates how PersistentVolumeClaims should be
|
||||
// provisioned and bound. When unset, VolumeBindingImmediate is used.
|
||||
// This field is alpha-level and is only honored by servers that enable
|
||||
// the VolumeScheduling feature.
|
||||
// This field is only honored by servers that enable the VolumeScheduling feature.
|
||||
// +optional
|
||||
VolumeBindingMode *VolumeBindingMode
|
||||
|
||||
// Restrict the node topologies where volumes can be dynamically provisioned.
|
||||
// Each volume plugin defines its own supported topology specifications.
|
||||
// An empty TopologySelectorTerm list means there is no topology restriction.
|
||||
// This field is alpha-level and is only honored by servers that enable
|
||||
// the DynamicProvisioningScheduling feature.
|
||||
// This field is only honored by servers that enable the VolumeScheduling feature.
|
||||
// +optional
|
||||
AllowedTopologies []api.TopologySelectorTerm
|
||||
}
|
||||
|
||||
@@ -26,8 +26,6 @@ import (
|
||||
func DropDisabledAlphaFields(class *storage.StorageClass) {
|
||||
if !utilfeature.DefaultFeatureGate.Enabled(features.VolumeScheduling) {
|
||||
class.VolumeBindingMode = nil
|
||||
}
|
||||
if !utilfeature.DefaultFeatureGate.Enabled(features.DynamicProvisioningScheduling) {
|
||||
class.AllowedTopologies = nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,8 +250,8 @@ func validateAllowedTopologies(topologies []api.TopologySelectorTerm, fldPath *f
|
||||
return allErrs
|
||||
}
|
||||
|
||||
if !utilfeature.DefaultFeatureGate.Enabled(features.DynamicProvisioningScheduling) {
|
||||
allErrs = append(allErrs, field.Forbidden(fldPath, "field is disabled by feature-gate DynamicProvisioningScheduling"))
|
||||
if !utilfeature.DefaultFeatureGate.Enabled(features.VolumeScheduling) {
|
||||
allErrs = append(allErrs, field.Forbidden(fldPath, "field is disabled by feature-gate VolumeScheduling"))
|
||||
}
|
||||
|
||||
rawTopologies := make([]map[string]sets.String, len(topologies))
|
||||
|
||||
Reference in New Issue
Block a user