mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +00:00
Merge pull request #129296 from carlory/fg-CPUManager
Remove general available feature-gate CPUManager
This commit is contained in:
commit
3eb5fa2b1b
@ -84,11 +84,6 @@ const (
|
|||||||
// Enable nodes to change CPUCFSQuotaPeriod
|
// Enable nodes to change CPUCFSQuotaPeriod
|
||||||
CPUCFSQuotaPeriod featuregate.Feature = "CustomCPUCFSQuotaPeriod"
|
CPUCFSQuotaPeriod featuregate.Feature = "CustomCPUCFSQuotaPeriod"
|
||||||
|
|
||||||
// owner: @ConnorDoyle, @fromanirh (only for GA graduation)
|
|
||||||
//
|
|
||||||
// Alternative container-level CPU affinity policies.
|
|
||||||
CPUManager featuregate.Feature = "CPUManager"
|
|
||||||
|
|
||||||
// owner: @fromanirh
|
// owner: @fromanirh
|
||||||
// beta: see below.
|
// beta: see below.
|
||||||
//
|
//
|
||||||
@ -1046,12 +1041,6 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate
|
|||||||
{Version: version.MustParse("1.12"), Default: false, PreRelease: featuregate.Alpha},
|
{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: {
|
CPUManagerPolicyAlphaOptions: {
|
||||||
{Version: version.MustParse("1.23"), Default: false, PreRelease: featuregate.Alpha},
|
{Version: version.MustParse("1.23"), Default: false, PreRelease: featuregate.Alpha},
|
||||||
},
|
},
|
||||||
|
4
pkg/generated/openapi/zz_generated.openapi.go
generated
4
pkg/generated/openapi/zz_generated.openapi.go
generated
@ -66516,7 +66516,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen
|
|||||||
},
|
},
|
||||||
"cpuManagerPolicy": {
|
"cpuManagerPolicy": {
|
||||||
SchemaProps: spec.SchemaProps{
|
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"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
},
|
},
|
||||||
@ -66546,7 +66546,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen
|
|||||||
},
|
},
|
||||||
"cpuManagerReconcilePeriod": {
|
"cpuManagerReconcilePeriod": {
|
||||||
SchemaProps: spec.SchemaProps{
|
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"),
|
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -253,13 +253,11 @@ type KubeletConfiguration struct {
|
|||||||
// a group. It means that if true, the behavior aligns with the behavior of cgroups v1.
|
// a group. It means that if true, the behavior aligns with the behavior of cgroups v1.
|
||||||
SingleProcessOOMKill *bool
|
SingleProcessOOMKill *bool
|
||||||
// CPUManagerPolicy is the name of the policy to use.
|
// CPUManagerPolicy is the name of the policy to use.
|
||||||
// Requires the CPUManager feature gate to be enabled.
|
|
||||||
CPUManagerPolicy string
|
CPUManagerPolicy string
|
||||||
// CPUManagerPolicyOptions is a set of key=value which allows to set extra options
|
// CPUManagerPolicyOptions is a set of key=value which allows to set extra options
|
||||||
// to fine tune the behaviour of the cpu manager policies.
|
// to fine tune the behaviour of the cpu manager policies.
|
||||||
CPUManagerPolicyOptions map[string]string
|
CPUManagerPolicyOptions map[string]string
|
||||||
// CPU Manager reconciliation period.
|
// CPU Manager reconciliation period.
|
||||||
// Requires the CPUManager feature gate to be enabled.
|
|
||||||
CPUManagerReconcilePeriod metav1.Duration
|
CPUManagerReconcilePeriod metav1.Duration
|
||||||
// MemoryManagerPolicy is the name of the policy to use.
|
// MemoryManagerPolicy is the name of the policy to use.
|
||||||
// Requires the MemoryManager feature gate to be enabled.
|
// Requires the MemoryManager feature gate to be enabled.
|
||||||
|
@ -2867,13 +2867,11 @@ func (kl *Kubelet) HandlePodSyncs(pods []*v1.Pod) {
|
|||||||
// otherwise.
|
// otherwise.
|
||||||
func (kl *Kubelet) canResizePod(pod *v1.Pod) (bool, string, string) {
|
func (kl *Kubelet) canResizePod(pod *v1.Pod) (bool, string, string) {
|
||||||
if v1qos.GetPodQOS(pod) == v1.PodQOSGuaranteed && !utilfeature.DefaultFeatureGate.Enabled(features.InPlacePodVerticalScalingExclusiveCPUs) {
|
if v1qos.GetPodQOS(pod) == v1.PodQOSGuaranteed && !utilfeature.DefaultFeatureGate.Enabled(features.InPlacePodVerticalScalingExclusiveCPUs) {
|
||||||
if utilfeature.DefaultFeatureGate.Enabled(features.CPUManager) {
|
|
||||||
if kl.containerManager.GetNodeConfig().CPUManagerPolicy == "static" {
|
if kl.containerManager.GetNodeConfig().CPUManagerPolicy == "static" {
|
||||||
msg := "Resize is infeasible for Guaranteed Pods alongside CPU Manager static policy"
|
msg := "Resize is infeasible for Guaranteed Pods alongside CPU Manager static policy"
|
||||||
klog.V(3).InfoS(msg, "pod", format.Pod(pod))
|
klog.V(3).InfoS(msg, "pod", format.Pod(pod))
|
||||||
return false, v1.PodReasonInfeasible, msg
|
return false, v1.PodReasonInfeasible, msg
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if utilfeature.DefaultFeatureGate.Enabled(features.MemoryManager) {
|
if utilfeature.DefaultFeatureGate.Enabled(features.MemoryManager) {
|
||||||
if kl.containerManager.GetNodeConfig().MemoryManagerPolicy == "Static" {
|
if kl.containerManager.GetNodeConfig().MemoryManagerPolicy == "Static" {
|
||||||
msg := "Resize is infeasible for Guaranteed Pods alongside Memory Manager static policy"
|
msg := "Resize is infeasible for Guaranteed Pods alongside Memory Manager static policy"
|
||||||
|
@ -391,7 +391,6 @@ type KubeletConfiguration struct {
|
|||||||
// +optional
|
// +optional
|
||||||
CgroupDriver string `json:"cgroupDriver,omitempty"`
|
CgroupDriver string `json:"cgroupDriver,omitempty"`
|
||||||
// cpuManagerPolicy is the name of the policy to use.
|
// cpuManagerPolicy is the name of the policy to use.
|
||||||
// Requires the CPUManager feature gate to be enabled.
|
|
||||||
// Default: "None"
|
// Default: "None"
|
||||||
// +optional
|
// +optional
|
||||||
CPUManagerPolicy string `json:"cpuManagerPolicy,omitempty"`
|
CPUManagerPolicy string `json:"cpuManagerPolicy,omitempty"`
|
||||||
@ -410,7 +409,6 @@ type KubeletConfiguration struct {
|
|||||||
// +optional
|
// +optional
|
||||||
CPUManagerPolicyOptions map[string]string `json:"cpuManagerPolicyOptions,omitempty"`
|
CPUManagerPolicyOptions map[string]string `json:"cpuManagerPolicyOptions,omitempty"`
|
||||||
// cpuManagerReconcilePeriod is the reconciliation period for the CPU Manager.
|
// cpuManagerReconcilePeriod is the reconciliation period for the CPU Manager.
|
||||||
// Requires the CPUManager feature gate to be enabled.
|
|
||||||
// Default: "10s"
|
// Default: "10s"
|
||||||
// +optional
|
// +optional
|
||||||
CPUManagerReconcilePeriod metav1.Duration `json:"cpuManagerReconcilePeriod,omitempty"`
|
CPUManagerReconcilePeriod metav1.Duration `json:"cpuManagerReconcilePeriod,omitempty"`
|
||||||
|
@ -267,20 +267,6 @@
|
|||||||
lockToDefault: false
|
lockToDefault: false
|
||||||
preRelease: Alpha
|
preRelease: Alpha
|
||||||
version: "1.12"
|
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
|
- name: CPUManagerPolicyAlphaOptions
|
||||||
versionedSpecs:
|
versionedSpecs:
|
||||||
- default: false
|
- default: false
|
||||||
|
@ -70,7 +70,13 @@ var (
|
|||||||
// Marks tests that require coordinated leader election
|
// Marks tests that require coordinated leader election
|
||||||
CoordinatedLeaderElection = framework.WithFeature(framework.ValidFeatures.Add("CoordinatedLeaderElection"))
|
CoordinatedLeaderElection = framework.WithFeature(framework.ValidFeatures.Add("CoordinatedLeaderElection"))
|
||||||
|
|
||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
// owning-sig: sig-node
|
||||||
|
// kep: https://kep.k8s.io/3570
|
||||||
|
// test-infra jobs:
|
||||||
|
// - https://testgrid.k8s.io/sig-node-kubelet#kubelet-serial-gce-e2e-cpu-manager
|
||||||
|
//
|
||||||
|
// This label is used for tests which need:
|
||||||
|
// - 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
|
||||||
CPUManager = framework.WithFeature(framework.ValidFeatures.Add("CPUManager"))
|
CPUManager = framework.WithFeature(framework.ValidFeatures.Add("CPUManager"))
|
||||||
|
|
||||||
// OWNER: sig-node
|
// OWNER: sig-node
|
||||||
|
Loading…
Reference in New Issue
Block a user