Skip to content

Commit

Permalink
Rename the min and max scale for stagePodAutoScaler
Browse files Browse the repository at this point in the history
  • Loading branch information
houshengbo committed Nov 14, 2023
1 parent 8b1cd08 commit 4be398b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pkg/apis/serving/v1/stagepodautoscaler_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (spa *StagePodAutoscaler) GetGroupVersionKind() schema.GroupVersionKind {
}

func (spa *StagePodAutoscaler) ScaleBounds() (*int32, *int32) {
return spa.Spec.MinScale, spa.Spec.MaxScale
return spa.Spec.StageMinScale, spa.Spec.StageMaxScale
}

func (spa *StagePodAutoscaler) IsStageScaleInReady() bool {
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/serving/v1/stagepodautoscaler_lifecycle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ func TestStagePodAutoscalerScaleBounds(t *testing.T) {

stagePodAutoscaler := &StagePodAutoscaler{
Spec: StagePodAutoscalerSpec{
MinScale: minScale,
MaxScale: maxScale,
StageMinScale: minScale,
StageMaxScale: maxScale,
},
}

Expand Down
8 changes: 4 additions & 4 deletions pkg/apis/serving/v1/stagepodautoscaler_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ type StagePodAutoscalerList struct {
}

type StagePodAutoscalerSpec struct {
// MinScale sets the lower bound for the number of the replicas.
// StageMinScale sets the lower bound for the number of the replicas.
// +optional
MinScale *int32 `json:"minScale,omitempty"`
StageMinScale *int32 `json:"stageMinScale,omitempty"`

// MaxScale sets the upper bound for the number of the replicas.
// StageMaxScale sets the upper bound for the number of the replicas.
// +optional
MaxScale *int32 `json:"maxScale,omitempty"`
StageMaxScale *int32 `json:"stageMaxScale,omitempty"`
}

// GetStatus retrieves the status of the StagePodAutoscaler. Implements the KRShaped interface.
Expand Down
8 changes: 4 additions & 4 deletions pkg/apis/serving/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4be398b

Please sign in to comment.