diff --git a/pkg/features/kube_features.go b/pkg/features/kube_features.go index e0d37c5bfb7..8e2833a6af2 100644 --- a/pkg/features/kube_features.go +++ b/pkg/features/kube_features.go @@ -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() { diff --git a/pkg/features/versioned_kube_features.go b/pkg/features/versioned_kube_features.go index 8158e71c8b9..e07b9b7a8b5 100644 --- a/pkg/features/versioned_kube_features.go +++ b/pkg/features/versioned_kube_features.go @@ -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}, + }, } diff --git a/test/featuregates_linter/test_data/versioned_feature_list.yaml b/test/featuregates_linter/test_data/versioned_feature_list.yaml index 30db7939e98..3a33b892873 100644 --- a/test/featuregates_linter/test_data/versioned_feature_list.yaml +++ b/test/featuregates_linter/test_data/versioned_feature_list.yaml @@ -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