From 97861325ae34a4a80eece50484c3913a79201381 Mon Sep 17 00:00:00 2001 From: Francesco Romani Date: Wed, 15 Oct 2025 12:17:07 +0200 Subject: [PATCH] KEP-4622: node: topomgr: max-allowable-numa-nodes to GA promote the policy option to GA. Signed-off-by: Francesco Romani --- .../cm/topologymanager/policy_options.go | 7 ++--- .../cm/topologymanager/policy_options_test.go | 28 +++++++++---------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/pkg/kubelet/cm/topologymanager/policy_options.go b/pkg/kubelet/cm/topologymanager/policy_options.go index 38baac6ac57..dd90824014b 100644 --- a/pkg/kubelet/cm/topologymanager/policy_options.go +++ b/pkg/kubelet/cm/topologymanager/policy_options.go @@ -32,12 +32,11 @@ const ( ) var ( - alphaOptions = sets.New[string]() - betaOptions = sets.New[string]( - MaxAllowableNUMANodes, - ) + alphaOptions = sets.New[string]() + betaOptions = sets.New[string]() stableOptions = sets.New[string]( PreferClosestNUMANodes, + MaxAllowableNUMANodes, ) ) diff --git a/pkg/kubelet/cm/topologymanager/policy_options_test.go b/pkg/kubelet/cm/topologymanager/policy_options_test.go index 80b5cfcdb9b..26c750fe419 100644 --- a/pkg/kubelet/cm/topologymanager/policy_options_test.go +++ b/pkg/kubelet/cm/topologymanager/policy_options_test.go @@ -60,9 +60,7 @@ func TestNewTopologyManagerOptions(t *testing.T) { }, }, { - description: "return TopologyManagerOptions with MaxAllowableNUMANodes set to 12", - featureGate: pkgfeatures.TopologyManagerPolicyBetaOptions, - featureGateEnable: true, + description: "return TopologyManagerOptions with MaxAllowableNUMANodes set to 12", expectedOptions: PolicyOptions{ MaxAllowableNUMANodes: 12, }, @@ -70,14 +68,6 @@ func TestNewTopologyManagerOptions(t *testing.T) { MaxAllowableNUMANodes: "12", }, }, - { - description: "fail to set option when TopologyManagerPolicyBetaOptions feature gate is not set", - featureGate: pkgfeatures.TopologyManagerPolicyBetaOptions, - policyOptions: map[string]string{ - MaxAllowableNUMANodes: "8", - }, - expectedErr: fmt.Errorf("topology manager policy beta-level options not enabled,"), - }, { description: "return empty TopologyManagerOptions", expectedOptions: PolicyOptions{ @@ -93,9 +83,7 @@ func TestNewTopologyManagerOptions(t *testing.T) { expectedErr: fmt.Errorf("bad value for option"), }, { - description: "fail to parse options with error MaxAllowableNUMANodes", - featureGate: pkgfeatures.TopologyManagerPolicyAlphaOptions, - featureGateEnable: true, + description: "fail to parse options with error MaxAllowableNUMANodes", policyOptions: map[string]string{ MaxAllowableNUMANodes: "can't parse to int", }, @@ -229,6 +217,18 @@ func TestPolicyOptionsAvailable(t *testing.T) { featureGateEnable: false, expectedAvailable: true, }, + { + option: MaxAllowableNUMANodes, + featureGate: pkgfeatures.TopologyManagerPolicyBetaOptions, + featureGateEnable: false, + expectedAvailable: true, + }, + { + option: PreferClosestNUMANodes, + featureGate: pkgfeatures.TopologyManagerPolicyAlphaOptions, + featureGateEnable: false, + expectedAvailable: true, + }, { option: fancyAlphaOption, featureGate: pkgfeatures.TopologyManagerPolicyAlphaOptions,