mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-17 20:00:07 +00:00
KEP-4622: node: topomgr: max-allowable-numa-nodes to GA
promote the policy option to GA. Signed-off-by: Francesco Romani <fromani@redhat.com>
This commit is contained in:
@@ -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,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user