add feature gate

Co-authored-by: Francesco Romani <fromani@redhat.com>
This commit is contained in:
Scott Grimes 2025-02-11 13:42:22 -05:00
parent 03bf94bac0
commit 437cd38e19
3 changed files with 25 additions and 0 deletions

View File

@ -862,6 +862,22 @@ const (
//
// Enables specifying resources at pod-level.
PodLevelResources featuregate.Feature = "PodLevelResources"
// owner: @ffromani
// beta: v1.33
//
// Disables CPU Quota for containers which have exclusive CPUs allocated.
// Disables pod-Level CPU Quota for pods containing at least one container with exclusive CPUs allocated
// Exclusive CPUs for a container (init, application, sidecar) are allocated when:
// (1) cpumanager policy is static,
// (2) the pod has QoS Guaranteed,
// (3) the container has integer cpu request.
// The expected behavior is that CPU Quota for containers having exclusive CPUs allocated is disabled.
// Because this fix changes a long-established (but incorrect) behavior, users observing
// any regressions can use the DisableCPUQuotaWithExclusiveCPUs feature gate (default on) to
// restore the old behavior. Please file issues if you hit issues and have to use this Feature Gate.
// The Feature Gate will be locked to true and then removed in +2 releases (1.35) if there are no bug reported
DisableCPUQuotaWithExclusiveCPUs featuregate.Feature = "DisableCPUQuotaWithExclusiveCPUs"
)
func init() {

View File

@ -828,4 +828,7 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate
zpagesfeatures.ComponentStatusz: {
{Version: version.MustParse("1.32"), Default: false, PreRelease: featuregate.Alpha},
},
DisableCPUQuotaWithExclusiveCPUs: {
{Version: version.MustParse("1.33"), Default: true, PreRelease: featuregate.Beta},
},
}

View File

@ -416,6 +416,12 @@
lockToDefault: true
preRelease: GA
version: "1.31"
- name: DisableCPUQuotaWithExclusiveCPUs
versionedSpecs:
- default: true
lockToDefault: false
preRelease: Beta
version: "1.33"
- name: DisableKubeletCloudCredentialProviders
versionedSpecs:
- default: false