diff --git a/config/crd/bases/config.katalyst.kubewharf.io_adminqosconfigurations.yaml b/config/crd/bases/config.katalyst.kubewharf.io_adminqosconfigurations.yaml index cab051e7..c3e4c8d1 100644 --- a/config/crd/bases/config.katalyst.kubewharf.io_adminqosconfigurations.yaml +++ b/config/crd/bases/config.katalyst.kubewharf.io_adminqosconfigurations.yaml @@ -740,6 +740,14 @@ spec: If set to false, it means that cpu burst should be disabled for pods with dedicated cores (cpu burst value is set to 0). If set to nil, it means that no operation is done on the cpu burst value. type: boolean + enableSharedCoresDefaultCPUBurst: + description: |- + EnableSharedCoresDefaultCPUBurst indicates whether cpu burst should be enabled by default for pods with shared cores. + To avoid cpu contention with other pods, CPU burst should only be enabled for shared cores pods when they are the sole shared cores pod running on the node. + If set to true, it means that cpu burst should be enabled by default for pods with shared cores (cpu burst value is calculated and set). + If set to false, it means that cpu burst should be disabled for pods with shared cores (cpu burst value is set to 0). + If set to nil, it means that no operation is done on the cpu burst value. + type: boolean type: object type: object qrmPluginConfig: diff --git a/pkg/apis/config/v1alpha1/adminqos.go b/pkg/apis/config/v1alpha1/adminqos.go index efa0a6c4..129f4f24 100644 --- a/pkg/apis/config/v1alpha1/adminqos.go +++ b/pkg/apis/config/v1alpha1/adminqos.go @@ -945,6 +945,14 @@ type CPUBurstConfig struct { // +optional EnableDedicatedCoresDefaultCPUBurst *bool `json:"enableDedicatedCoresDefaultCPUBurst,omitempty"` + // EnableSharedCoresDefaultCPUBurst indicates whether cpu burst should be enabled by default for pods with shared cores. + // To avoid cpu contention with other pods, CPU burst should only be enabled for shared cores pods when they are the sole shared cores pod running on the node. + // If set to true, it means that cpu burst should be enabled by default for pods with shared cores (cpu burst value is calculated and set). + // If set to false, it means that cpu burst should be disabled for pods with shared cores (cpu burst value is set to 0). + // If set to nil, it means that no operation is done on the cpu burst value. + // +optional + EnableSharedCoresDefaultCPUBurst *bool `json:"enableSharedCoresDefaultCPUBurst,omitempty"` + // DefaultCPUBurstPercent is the default cpu burst percent to be set for pods with dedicated cores. // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:Maximum=100 diff --git a/pkg/apis/config/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/config/v1alpha1/zz_generated.deepcopy.go index 2e1790c2..d910508b 100644 --- a/pkg/apis/config/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/config/v1alpha1/zz_generated.deepcopy.go @@ -429,6 +429,11 @@ func (in *CPUBurstConfig) DeepCopyInto(out *CPUBurstConfig) { *out = new(bool) **out = **in } + if in.EnableSharedCoresDefaultCPUBurst != nil { + in, out := &in.EnableSharedCoresDefaultCPUBurst, &out.EnableSharedCoresDefaultCPUBurst + *out = new(bool) + **out = **in + } if in.DefaultCPUBurstPercent != nil { in, out := &in.DefaultCPUBurstPercent, &out.DefaultCPUBurstPercent *out = new(int64)