mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 03:57:41 +00:00
DRA apiserver: allow DRAAdminAccess feature without DynamicResourceAllocation
This makes a configuration with --feature-gates=AllAlpha=true valid again. Without this change, that flag enabled DRAAdminAccess without DynamicResourceAllocation being enabled (default off!) and the kube-apiserver refused to start. While DRAAdminAccess isn't usable without DynamicResourceAllocation, it's also not really wrong to allow it - it simply won't matter.
This commit is contained in:
parent
a1b8e9d3a7
commit
d6bad27b7d
@ -77,13 +77,6 @@ func validateNodeSelectorAuthorizationFeature() []error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func validateDRAAdminAccessFeature() []error {
|
||||
if utilfeature.DefaultFeatureGate.Enabled(features.DRAAdminAccess) && !utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) {
|
||||
return []error{fmt.Errorf("DRAAdminAccess feature requires DynamicResourceAllocation feature to be enabled")}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func validateUnknownVersionInteroperabilityProxyFeature() []error {
|
||||
if utilfeature.DefaultFeatureGate.Enabled(features.UnknownVersionInteroperabilityProxy) {
|
||||
if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.StorageVersionAPI) {
|
||||
@ -128,7 +121,6 @@ func (s *Options) Validate() []error {
|
||||
errs = append(errs, validateUnknownVersionInteroperabilityProxyFeature()...)
|
||||
errs = append(errs, validateUnknownVersionInteroperabilityProxyFlags(s)...)
|
||||
errs = append(errs, validateNodeSelectorAuthorizationFeature()...)
|
||||
errs = append(errs, validateDRAAdminAccessFeature()...)
|
||||
|
||||
return errs
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user