Merge pull request #37789 from yarntime/check_min_max

Automatic merge from submit-queue

check the value of min and max in kubectl

check the value of min and max in kubectl.
This commit is contained in:
Kubernetes Submit Queue 2016-12-04 16:39:24 -08:00 committed by GitHub
commit 513893c96e

View File

@ -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 {