Skip to content

Commit

Permalink
Merge pull request kubernetes#37789 from yarntime/check_min_max
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue

check the value of min and max in kubectl

check the value of min and max in kubectl.
  • Loading branch information
Kubernetes Submit Queue authored Dec 5, 2016
2 parents bc34200 + 4bbc3ba commit 513893c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/kubectl/autoscale.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ func generateHPA(genericParams map[string]interface{}) (runtime.Object, error) {
if err != nil {
return nil, err
}

if min > max {
return nil, fmt.Errorf("'max' must be greater than or equal to 'min'.")
}

cpuString, found := params["cpu-percent"]
cpu := -1
if found {
Expand Down

0 comments on commit 513893c

Please sign in to comment.