Skip to content

Commit 3eb5fa2

Browse files
authored
Merge pull request kubernetes#129296 from carlory/fg-CPUManager
Remove general available feature-gate CPUManager
2 parents c029e27 + a9526f6 commit 3eb5fa2

File tree

7 files changed

+13
-38
lines changed

7 files changed

+13
-38
lines changed

pkg/features/kube_features.go

-11
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,6 @@ const (
8484
// Enable nodes to change CPUCFSQuotaPeriod
8585
CPUCFSQuotaPeriod featuregate.Feature = "CustomCPUCFSQuotaPeriod"
8686

87-
// owner: @ConnorDoyle, @fromanirh (only for GA graduation)
88-
//
89-
// Alternative container-level CPU affinity policies.
90-
CPUManager featuregate.Feature = "CPUManager"
91-
9287
// owner: @fromanirh
9388
// beta: see below.
9489
//
@@ -1046,12 +1041,6 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate
10461041
{Version: version.MustParse("1.12"), Default: false, PreRelease: featuregate.Alpha},
10471042
},
10481043

1049-
CPUManager: {
1050-
{Version: version.MustParse("1.8"), Default: false, PreRelease: featuregate.Alpha},
1051-
{Version: version.MustParse("1.10"), Default: true, PreRelease: featuregate.Beta},
1052-
{Version: version.MustParse("1.26"), Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // GA in 1.26
1053-
},
1054-
10551044
CPUManagerPolicyAlphaOptions: {
10561045
{Version: version.MustParse("1.23"), Default: false, PreRelease: featuregate.Alpha},
10571046
},

pkg/generated/openapi/zz_generated.openapi.go

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/kubelet/apis/config/types.go

-2
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,11 @@ type KubeletConfiguration struct {
253253
// a group. It means that if true, the behavior aligns with the behavior of cgroups v1.
254254
SingleProcessOOMKill *bool
255255
// CPUManagerPolicy is the name of the policy to use.
256-
// Requires the CPUManager feature gate to be enabled.
257256
CPUManagerPolicy string
258257
// CPUManagerPolicyOptions is a set of key=value which allows to set extra options
259258
// to fine tune the behaviour of the cpu manager policies.
260259
CPUManagerPolicyOptions map[string]string
261260
// CPU Manager reconciliation period.
262-
// Requires the CPUManager feature gate to be enabled.
263261
CPUManagerReconcilePeriod metav1.Duration
264262
// MemoryManagerPolicy is the name of the policy to use.
265263
// Requires the MemoryManager feature gate to be enabled.

pkg/kubelet/kubelet.go

+4-6
Original file line numberDiff line numberDiff line change
@@ -2867,12 +2867,10 @@ func (kl *Kubelet) HandlePodSyncs(pods []*v1.Pod) {
28672867
// otherwise.
28682868
func (kl *Kubelet) canResizePod(pod *v1.Pod) (bool, string, string) {
28692869
if v1qos.GetPodQOS(pod) == v1.PodQOSGuaranteed && !utilfeature.DefaultFeatureGate.Enabled(features.InPlacePodVerticalScalingExclusiveCPUs) {
2870-
if utilfeature.DefaultFeatureGate.Enabled(features.CPUManager) {
2871-
if kl.containerManager.GetNodeConfig().CPUManagerPolicy == "static" {
2872-
msg := "Resize is infeasible for Guaranteed Pods alongside CPU Manager static policy"
2873-
klog.V(3).InfoS(msg, "pod", format.Pod(pod))
2874-
return false, v1.PodReasonInfeasible, msg
2875-
}
2870+
if kl.containerManager.GetNodeConfig().CPUManagerPolicy == "static" {
2871+
msg := "Resize is infeasible for Guaranteed Pods alongside CPU Manager static policy"
2872+
klog.V(3).InfoS(msg, "pod", format.Pod(pod))
2873+
return false, v1.PodReasonInfeasible, msg
28762874
}
28772875
if utilfeature.DefaultFeatureGate.Enabled(features.MemoryManager) {
28782876
if kl.containerManager.GetNodeConfig().MemoryManagerPolicy == "Static" {

staging/src/k8s.io/kubelet/config/v1beta1/types.go

-2
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,6 @@ type KubeletConfiguration struct {
391391
// +optional
392392
CgroupDriver string `json:"cgroupDriver,omitempty"`
393393
// cpuManagerPolicy is the name of the policy to use.
394-
// Requires the CPUManager feature gate to be enabled.
395394
// Default: "None"
396395
// +optional
397396
CPUManagerPolicy string `json:"cpuManagerPolicy,omitempty"`
@@ -410,7 +409,6 @@ type KubeletConfiguration struct {
410409
// +optional
411410
CPUManagerPolicyOptions map[string]string `json:"cpuManagerPolicyOptions,omitempty"`
412411
// cpuManagerReconcilePeriod is the reconciliation period for the CPU Manager.
413-
// Requires the CPUManager feature gate to be enabled.
414412
// Default: "10s"
415413
// +optional
416414
CPUManagerReconcilePeriod metav1.Duration `json:"cpuManagerReconcilePeriod,omitempty"`

test/compatibility_lifecycle/reference/versioned_feature_list.yaml

-14
Original file line numberDiff line numberDiff line change
@@ -267,20 +267,6 @@
267267
lockToDefault: false
268268
preRelease: Alpha
269269
version: "1.12"
270-
- name: CPUManager
271-
versionedSpecs:
272-
- default: false
273-
lockToDefault: false
274-
preRelease: Alpha
275-
version: "1.8"
276-
- default: true
277-
lockToDefault: false
278-
preRelease: Beta
279-
version: "1.10"
280-
- default: true
281-
lockToDefault: true
282-
preRelease: GA
283-
version: "1.26"
284270
- name: CPUManagerPolicyAlphaOptions
285271
versionedSpecs:
286272
- default: false

test/e2e/feature/feature.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,13 @@ var (
7070
// Marks tests that require coordinated leader election
7171
CoordinatedLeaderElection = framework.WithFeature(framework.ValidFeatures.Add("CoordinatedLeaderElection"))
7272

73-
// TODO: document the feature (owning SIG, when to use this feature for a test)
73+
// owning-sig: sig-node
74+
// kep: https://kep.k8s.io/3570
75+
// test-infra jobs:
76+
// - https://testgrid.k8s.io/sig-node-kubelet#kubelet-serial-gce-e2e-cpu-manager
77+
//
78+
// This label is used for tests which need:
79+
// - run only CPU Manager tests on specific jobs, i.e., ci-kubernetes-node-kubelet-serial-cpu-manager and pull-kubernetes-node-kubelet-serial-cpu-manager
7480
CPUManager = framework.WithFeature(framework.ValidFeatures.Add("CPUManager"))
7581

7682
// OWNER: sig-node

0 commit comments

Comments
 (0)