From 033f916ea37437f0bb752a300ae7dc8eb8bc16a7 Mon Sep 17 00:00:00 2001 From: Lucas Sant' Anna <76971778+lucass4@users.noreply.github.com> Date: Tue, 31 Jan 2023 14:25:04 -0800 Subject: [PATCH] feat: add support for CPUCFSQuota (#187) * feat: add support for CPUCFSQuota * feat: add support for CPUCFSQuota * feat: add support for CPUCFSQuota * feat: add support for CPUCFSQuota --------- Co-authored-by: Jonathan Innis --- pkg/apis/crds/karpenter.sh_machines.yaml | 4 ++++ pkg/apis/crds/karpenter.sh_provisioners.yaml | 4 ++++ pkg/apis/v1alpha5/machine.go | 3 +++ 3 files changed, 11 insertions(+) diff --git a/pkg/apis/crds/karpenter.sh_machines.yaml b/pkg/apis/crds/karpenter.sh_machines.yaml index df0e7b4bd7..03f5118700 100644 --- a/pkg/apis/crds/karpenter.sh_machines.yaml +++ b/pkg/apis/crds/karpenter.sh_machines.yaml @@ -58,6 +58,10 @@ spec: description: ContainerRuntime is the container runtime to be used with your worker nodes. type: string + cpuCFSQuota: + description: CPUCFSQuota enables CPU CFS quota enforcement for + containers that specify CPU limits. + type: boolean evictionHard: additionalProperties: type: string diff --git a/pkg/apis/crds/karpenter.sh_provisioners.yaml b/pkg/apis/crds/karpenter.sh_provisioners.yaml index 8cb0979793..fbb2c84655 100644 --- a/pkg/apis/crds/karpenter.sh_provisioners.yaml +++ b/pkg/apis/crds/karpenter.sh_provisioners.yaml @@ -67,6 +67,10 @@ spec: description: ContainerRuntime is the container runtime to be used with your worker nodes. type: string + cpuCFSQuota: + description: CPUCFSQuota enables CPU CFS quota enforcement for + containers that specify CPU limits. + type: boolean evictionHard: additionalProperties: type: string diff --git a/pkg/apis/v1alpha5/machine.go b/pkg/apis/v1alpha5/machine.go index 61b2bff20f..7906a83de5 100644 --- a/pkg/apis/v1alpha5/machine.go +++ b/pkg/apis/v1alpha5/machine.go @@ -101,6 +101,9 @@ type KubeletConfiguration struct { // +kubebuilder:validation:Maximum:=100 // +optional ImageGCLowThresholdPercent *int32 `json:"imageGCLowThresholdPercent,omitempty"` + // CPUCFSQuota enables CPU CFS quota enforcement for containers that specify CPU limits. + // +optional + CPUCFSQuota bool `json:"cpuCFSQuota,omitempty"` } type ProviderRef struct {