From 27dfa744058dfc05d718868f2544e034b227d30d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E9=B8=BF=E6=96=8C?= Date: Fri, 7 Jul 2023 11:02:45 +0800 Subject: [PATCH] feat(eviction): system pressure eviction use duration instead of times as threshold --- ...config.katalyst.kubewharf.io_adminqosconfigurations.yaml | 6 +++--- pkg/apis/config/v1alpha1/adminqos.go | 6 +++--- pkg/apis/config/v1alpha1/zz_generated.deepcopy.go | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/crd/bases/config.katalyst.kubewharf.io_adminqosconfigurations.yaml b/config/crd/bases/config.katalyst.kubewharf.io_adminqosconfigurations.yaml index a84eaa5..49b8748 100644 --- a/config/crd/bases/config.katalyst.kubewharf.io_adminqosconfigurations.yaml +++ b/config/crd/bases/config.katalyst.kubewharf.io_adminqosconfigurations.yaml @@ -188,9 +188,9 @@ spec: type: string minItems: 1 type: array - systemKswapdRateExceedTimesThreshold: - description: SystemKswapdRateExceedTimesThreshold is the - threshold for the number of times the kswapd reclaiming + systemKswapdRateExceedDurationThreshold: + description: SystemKswapdRateExceedDurationThreshold is + the threshold for the duration the kswapd reclaiming rate exceeds the threshold type: integer systemKswapdRateThreshold: diff --git a/pkg/apis/config/v1alpha1/adminqos.go b/pkg/apis/config/v1alpha1/adminqos.go index 2df03bd..b058393 100644 --- a/pkg/apis/config/v1alpha1/adminqos.go +++ b/pkg/apis/config/v1alpha1/adminqos.go @@ -281,11 +281,11 @@ type MemoryPressureEvictionConfig struct { // +optional SystemKswapdRateThreshold *int `json:"systemKswapdRateThreshold,omitempty"` - // SystemKswapdRateExceedTimesThreshold is the threshold for the number of - // times the kswapd reclaiming rate exceeds the threshold + // SystemKswapdRateExceedDurationThreshold is the threshold for the duration the kswapd reclaiming rate + // exceeds the threshold // +kubectl:validation:Minimum=0 // +optional - SystemKswapdRateExceedTimesThreshold *int `json:"systemKswapdRateExceedTimesThreshold,omitempty"` + SystemKswapdRateExceedDurationThreshold *int `json:"systemKswapdRateExceedDurationThreshold,omitempty"` // NumaEvictionRankingMetrics is the metrics used to rank pods for eviction // at the NUMA level diff --git a/pkg/apis/config/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/config/v1alpha1/zz_generated.deepcopy.go index 9aec0ac..783a130 100644 --- a/pkg/apis/config/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/config/v1alpha1/zz_generated.deepcopy.go @@ -686,8 +686,8 @@ func (in *MemoryPressureEvictionConfig) DeepCopyInto(out *MemoryPressureEviction *out = new(int) **out = **in } - if in.SystemKswapdRateExceedTimesThreshold != nil { - in, out := &in.SystemKswapdRateExceedTimesThreshold, &out.SystemKswapdRateExceedTimesThreshold + if in.SystemKswapdRateExceedDurationThreshold != nil { + in, out := &in.SystemKswapdRateExceedDurationThreshold, &out.SystemKswapdRateExceedDurationThreshold *out = new(int) **out = **in }