diff --git a/pkg/features/kube_features.go b/pkg/features/kube_features.go index ace72de0fea..e0b09608030 100644 --- a/pkg/features/kube_features.go +++ b/pkg/features/kube_features.go @@ -84,11 +84,6 @@ const ( // Enable nodes to change CPUCFSQuotaPeriod CPUCFSQuotaPeriod featuregate.Feature = "CustomCPUCFSQuotaPeriod" - // owner: @ConnorDoyle, @fromanirh (only for GA graduation) - // - // Alternative container-level CPU affinity policies. - CPUManager featuregate.Feature = "CPUManager" - // owner: @fromanirh // beta: see below. // @@ -1046,12 +1041,6 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate {Version: version.MustParse("1.12"), Default: false, PreRelease: featuregate.Alpha}, }, - CPUManager: { - {Version: version.MustParse("1.8"), Default: false, PreRelease: featuregate.Alpha}, - {Version: version.MustParse("1.10"), Default: true, PreRelease: featuregate.Beta}, - {Version: version.MustParse("1.26"), Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // GA in 1.26 - }, - CPUManagerPolicyAlphaOptions: { {Version: version.MustParse("1.23"), Default: false, PreRelease: featuregate.Alpha}, }, diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index 306ef725a1f..60ea7d11952 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -66516,7 +66516,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen }, "cpuManagerPolicy": { SchemaProps: spec.SchemaProps{ - Description: "cpuManagerPolicy is the name of the policy to use. Requires the CPUManager feature gate to be enabled. Default: \"None\"", + Description: "cpuManagerPolicy is the name of the policy to use. Default: \"None\"", Type: []string{"string"}, Format: "", }, @@ -66546,7 +66546,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen }, "cpuManagerReconcilePeriod": { SchemaProps: spec.SchemaProps{ - Description: "cpuManagerReconcilePeriod is the reconciliation period for the CPU Manager. Requires the CPUManager feature gate to be enabled. Default: \"10s\"", + Description: "cpuManagerReconcilePeriod is the reconciliation period for the CPU Manager. Default: \"10s\"", Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, diff --git a/pkg/kubelet/apis/config/types.go b/pkg/kubelet/apis/config/types.go index 4a04856ce16..3a3da8db5ed 100644 --- a/pkg/kubelet/apis/config/types.go +++ b/pkg/kubelet/apis/config/types.go @@ -253,13 +253,11 @@ type KubeletConfiguration struct { // a group. It means that if true, the behavior aligns with the behavior of cgroups v1. SingleProcessOOMKill *bool // CPUManagerPolicy is the name of the policy to use. - // Requires the CPUManager feature gate to be enabled. CPUManagerPolicy string // CPUManagerPolicyOptions is a set of key=value which allows to set extra options // to fine tune the behaviour of the cpu manager policies. CPUManagerPolicyOptions map[string]string // CPU Manager reconciliation period. - // Requires the CPUManager feature gate to be enabled. CPUManagerReconcilePeriod metav1.Duration // MemoryManagerPolicy is the name of the policy to use. // Requires the MemoryManager feature gate to be enabled. diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index fedf14af503..71068f0e7ed 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -2867,12 +2867,10 @@ func (kl *Kubelet) HandlePodSyncs(pods []*v1.Pod) { // otherwise. func (kl *Kubelet) canResizePod(pod *v1.Pod) (bool, string, string) { if v1qos.GetPodQOS(pod) == v1.PodQOSGuaranteed && !utilfeature.DefaultFeatureGate.Enabled(features.InPlacePodVerticalScalingExclusiveCPUs) { - if utilfeature.DefaultFeatureGate.Enabled(features.CPUManager) { - if kl.containerManager.GetNodeConfig().CPUManagerPolicy == "static" { - msg := "Resize is infeasible for Guaranteed Pods alongside CPU Manager static policy" - klog.V(3).InfoS(msg, "pod", format.Pod(pod)) - return false, v1.PodReasonInfeasible, msg - } + if kl.containerManager.GetNodeConfig().CPUManagerPolicy == "static" { + msg := "Resize is infeasible for Guaranteed Pods alongside CPU Manager static policy" + klog.V(3).InfoS(msg, "pod", format.Pod(pod)) + return false, v1.PodReasonInfeasible, msg } if utilfeature.DefaultFeatureGate.Enabled(features.MemoryManager) { if kl.containerManager.GetNodeConfig().MemoryManagerPolicy == "Static" { diff --git a/staging/src/k8s.io/kubelet/config/v1beta1/types.go b/staging/src/k8s.io/kubelet/config/v1beta1/types.go index 710dd50e770..474c5c0c91e 100644 --- a/staging/src/k8s.io/kubelet/config/v1beta1/types.go +++ b/staging/src/k8s.io/kubelet/config/v1beta1/types.go @@ -391,7 +391,6 @@ type KubeletConfiguration struct { // +optional CgroupDriver string `json:"cgroupDriver,omitempty"` // cpuManagerPolicy is the name of the policy to use. - // Requires the CPUManager feature gate to be enabled. // Default: "None" // +optional CPUManagerPolicy string `json:"cpuManagerPolicy,omitempty"` @@ -410,7 +409,6 @@ type KubeletConfiguration struct { // +optional CPUManagerPolicyOptions map[string]string `json:"cpuManagerPolicyOptions,omitempty"` // cpuManagerReconcilePeriod is the reconciliation period for the CPU Manager. - // Requires the CPUManager feature gate to be enabled. // Default: "10s" // +optional CPUManagerReconcilePeriod metav1.Duration `json:"cpuManagerReconcilePeriod,omitempty"` diff --git a/test/compatibility_lifecycle/reference/versioned_feature_list.yaml b/test/compatibility_lifecycle/reference/versioned_feature_list.yaml index 658daa9c738..1b748bcc5fd 100644 --- a/test/compatibility_lifecycle/reference/versioned_feature_list.yaml +++ b/test/compatibility_lifecycle/reference/versioned_feature_list.yaml @@ -267,20 +267,6 @@ lockToDefault: false preRelease: Alpha version: "1.12" -- name: CPUManager - versionedSpecs: - - default: false - lockToDefault: false - preRelease: Alpha - version: "1.8" - - default: true - lockToDefault: false - preRelease: Beta - version: "1.10" - - default: true - lockToDefault: true - preRelease: GA - version: "1.26" - name: CPUManagerPolicyAlphaOptions versionedSpecs: - default: false