diff --git a/config/crd/bases/config.katalyst.kubewharf.io_adminqosconfigurations.yaml b/config/crd/bases/config.katalyst.kubewharf.io_adminqosconfigurations.yaml index 53f2133..feebc47 100644 --- a/config/crd/bases/config.katalyst.kubewharf.io_adminqosconfigurations.yaml +++ b/config/crd/bases/config.katalyst.kubewharf.io_adminqosconfigurations.yaml @@ -579,6 +579,15 @@ spec: colocation between reclaimed_cores pod and other pods, otherwise, reclaim resource will be disabled. type: boolean + maxNodeUtilizationPercent: + additionalProperties: + format: int64 + type: integer + description: MaxNodeUtilizationPercent is the node resource + utilization limit for reclaimed resource. node resources + above the utilization will not be allocated to reclaimed + pool. + type: object memoryHeadroomConfig: description: MemoryHeadroomConfig is a configuration for memory headroom diff --git a/pkg/apis/config/v1alpha1/adminqos.go b/pkg/apis/config/v1alpha1/adminqos.go index d412d53..28a289e 100644 --- a/pkg/apis/config/v1alpha1/adminqos.go +++ b/pkg/apis/config/v1alpha1/adminqos.go @@ -106,6 +106,11 @@ type ReclaimedResourceConfig struct { // +optional MinReclaimedResourceForAllocate *v1.ResourceList `json:"minReclaimedResourceForAllocate,omitempty"` + // MaxNodeUtilizationPercent is the node resource utilization limit for reclaimed resource. + // node resources above the utilization will not be allocated to reclaimed pool. + // +optional + MaxNodeUtilizationPercent map[v1.ResourceName]int64 `json:"maxNodeUtilizationPercent,omitempty"` + // CPUHeadroomConfig is a configuration for cpu headroom // +optional CPUHeadroomConfig *CPUHeadroomConfig `json:"cpuHeadroomConfig,omitempty"` diff --git a/pkg/apis/config/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/config/v1alpha1/zz_generated.deepcopy.go index fa03c84..c5c30a0 100644 --- a/pkg/apis/config/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/config/v1alpha1/zz_generated.deepcopy.go @@ -1390,6 +1390,13 @@ func (in *ReclaimedResourceConfig) DeepCopyInto(out *ReclaimedResourceConfig) { } } } + if in.MaxNodeUtilizationPercent != nil { + in, out := &in.MaxNodeUtilizationPercent, &out.MaxNodeUtilizationPercent + *out = make(map[corev1.ResourceName]int64, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } if in.CPUHeadroomConfig != nil { in, out := &in.CPUHeadroomConfig, &out.CPUHeadroomConfig *out = new(CPUHeadroomConfig)