Skip to content

Commit 269bbac

Browse files
committed
KEP-4540: moved StrictCPUReservationOption to beta feature gate
1 parent 2cb9e77 commit 269bbac

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

pkg/kubelet/cm/cpumanager/policy_options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ var (
4242
DistributeCPUsAcrossNUMAOption,
4343
AlignBySocketOption,
4444
DistributeCPUsAcrossCoresOption,
45-
StrictCPUReservationOption,
4645
PreferAlignByUnCoreCacheOption,
4746
)
4847
betaOptions = sets.New[string](
4948
FullPCPUsOnlyOption,
49+
StrictCPUReservationOption,
5050
)
5151
stableOptions = sets.New[string]()
5252
)

pkg/kubelet/cm/cpumanager/policy_options_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,15 @@ func TestPolicyOptionsAvailable(t *testing.T) {
120120
},
121121
{
122122
option: StrictCPUReservationOption,
123-
featureGate: pkgfeatures.CPUManagerPolicyAlphaOptions,
124-
featureGateEnable: true,
125-
expectedAvailable: true,
123+
featureGate: pkgfeatures.CPUManagerPolicyBetaOptions,
124+
featureGateEnable: false,
125+
expectedAvailable: false,
126126
},
127127
{
128128
option: StrictCPUReservationOption,
129129
featureGate: pkgfeatures.CPUManagerPolicyBetaOptions,
130130
featureGateEnable: true,
131-
expectedAvailable: false,
131+
expectedAvailable: true,
132132
},
133133
}
134134
for _, testCase := range testCases {

pkg/kubelet/cm/cpumanager/policy_static_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ func TestStaticPolicyStart(t *testing.T) {
170170
}
171171
for _, testCase := range testCases {
172172
t.Run(testCase.description, func(t *testing.T) {
173-
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, pkgfeatures.CPUManagerPolicyAlphaOptions, true)
174173
p, err := NewStaticPolicy(testCase.topo, testCase.numReservedCPUs, cpuset.New(), topologymanager.NewFakeManager(), testCase.options)
175174
if err != nil {
176175
t.Fatalf("NewStaticPolicy() failed: %v", err)
@@ -1050,7 +1049,6 @@ func TestStaticPolicyStartWithResvList(t *testing.T) {
10501049
}
10511050
for _, testCase := range testCases {
10521051
t.Run(testCase.description, func(t *testing.T) {
1053-
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, pkgfeatures.CPUManagerPolicyAlphaOptions, true)
10541052
p, err := NewStaticPolicy(testCase.topo, testCase.numReservedCPUs, testCase.reserved, topologymanager.NewFakeManager(), testCase.cpuPolicyOptions)
10551053
if !reflect.DeepEqual(err, testCase.expNewErr) {
10561054
t.Errorf("StaticPolicy Start() error (%v). expected error: %v but got: %v",

0 commit comments

Comments
 (0)