KEP-4540: moved StrictCPUReservationOption to beta feature gate

This commit is contained in:
Mark Sasnal 2025-02-11 17:34:04 -05:00
parent 2cb9e77fde
commit 269bbac6e8
3 changed files with 5 additions and 7 deletions

View File

@ -42,11 +42,11 @@ var (
DistributeCPUsAcrossNUMAOption,
AlignBySocketOption,
DistributeCPUsAcrossCoresOption,
StrictCPUReservationOption,
PreferAlignByUnCoreCacheOption,
)
betaOptions = sets.New[string](
FullPCPUsOnlyOption,
StrictCPUReservationOption,
)
stableOptions = sets.New[string]()
)

View File

@ -120,15 +120,15 @@ func TestPolicyOptionsAvailable(t *testing.T) {
},
{
option: StrictCPUReservationOption,
featureGate: pkgfeatures.CPUManagerPolicyAlphaOptions,
featureGateEnable: true,
expectedAvailable: true,
featureGate: pkgfeatures.CPUManagerPolicyBetaOptions,
featureGateEnable: false,
expectedAvailable: false,
},
{
option: StrictCPUReservationOption,
featureGate: pkgfeatures.CPUManagerPolicyBetaOptions,
featureGateEnable: true,
expectedAvailable: false,
expectedAvailable: true,
},
}
for _, testCase := range testCases {

View File

@ -170,7 +170,6 @@ func TestStaticPolicyStart(t *testing.T) {
}
for _, testCase := range testCases {
t.Run(testCase.description, func(t *testing.T) {
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, pkgfeatures.CPUManagerPolicyAlphaOptions, true)
p, err := NewStaticPolicy(testCase.topo, testCase.numReservedCPUs, cpuset.New(), topologymanager.NewFakeManager(), testCase.options)
if err != nil {
t.Fatalf("NewStaticPolicy() failed: %v", err)
@ -1050,7 +1049,6 @@ func TestStaticPolicyStartWithResvList(t *testing.T) {
}
for _, testCase := range testCases {
t.Run(testCase.description, func(t *testing.T) {
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, pkgfeatures.CPUManagerPolicyAlphaOptions, true)
p, err := NewStaticPolicy(testCase.topo, testCase.numReservedCPUs, testCase.reserved, topologymanager.NewFakeManager(), testCase.cpuPolicyOptions)
if !reflect.DeepEqual(err, testCase.expNewErr) {
t.Errorf("StaticPolicy Start() error (%v). expected error: %v but got: %v",