From d6bad27b7dba172262f3080112538f7e6405360c Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Tue, 5 Nov 2024 20:24:40 +0100 Subject: [PATCH] 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. --- pkg/controlplane/apiserver/options/validation.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pkg/controlplane/apiserver/options/validation.go b/pkg/controlplane/apiserver/options/validation.go index 2f001025d4e..4838d1f29ef 100644 --- a/pkg/controlplane/apiserver/options/validation.go +++ b/pkg/controlplane/apiserver/options/validation.go @@ -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 }