From 75cdb0eeb5d910210151e86b33f0a8896d0f2a05 Mon Sep 17 00:00:00 2001 From: linzhecheng Date: Tue, 2 Jul 2024 10:38:19 +0800 Subject: [PATCH] chore: refine control knob constraints Signed-off-by: linzhecheng --- pkg/apis/config/v1alpha1/adminqos.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkg/apis/config/v1alpha1/adminqos.go b/pkg/apis/config/v1alpha1/adminqos.go index e14e689..6c2f63d 100644 --- a/pkg/apis/config/v1alpha1/adminqos.go +++ b/pkg/apis/config/v1alpha1/adminqos.go @@ -177,8 +177,7 @@ type IndicatorTargetConfiguration struct { Target float64 `json:"target"` } -type ControlKnobConstraints struct { - Name ControlKnobName `json:"name"` +type Constraints struct { // RestrictControlKnobMaxUpperGap is the maximum upward offset value from the baseline RestrictControlKnobMaxUpperGap *float64 `json:"restrictControlKnobMaxUpperGap,omitempty"` // RestrictControlKnobMaxUpperGap is the maximum downward offset value from the baseline @@ -189,6 +188,12 @@ type ControlKnobConstraints struct { RestrictControlKnobMaxLowerGapRatio *float64 `json:"restrictControlKnobMaxLowerGapRatio,omitempty"` } +type ControlKnobConstraints struct { + Name ControlKnobName `json:"name"` + // RestrictControlKnobMaxUpperGap is the maximum upward offset value from the baseline + Constraints Constraints `json:",inline"` +} + type CPUProvisionConfig struct { RegionIndicators []RegionIndicators `json:"regionIndicators,omitempty"` Constraints []ControlKnobConstraints `json:"constraints,omitempty"`