Skip to content

Commit

Permalink
chore: refine control knob constraints
Browse files Browse the repository at this point in the history
Signed-off-by: linzhecheng <[email protected]>
  • Loading branch information
cheney-lin committed Jul 2, 2024
1 parent d250abb commit 75cdb0e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkg/apis/config/v1alpha1/adminqos.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"`
Expand Down

0 comments on commit 75cdb0e

Please sign in to comment.