Merge pull request #79859 from sukeesh/hpa-error-log-fix

HPA incorrectly reported condition status
This commit is contained in:
Kubernetes Prow Robot 2019-07-11 07:28:55 -07:00 committed by GitHub
commit b500c740ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -732,13 +732,13 @@ func convertDesiredReplicasWithRules(currentReplicas, desiredReplicas, hpaMinRep
possibleLimitingReason = "the desired replica count is increasing faster than the maximum scale rate"
} else {
maximumAllowedReplicas = hpaMaxReplicas
possibleLimitingCondition = "TooManyReplicas"
possibleLimitingReason = "the desired replica count is more than the maximum replica count"
}
if desiredReplicas < minimumAllowedReplicas {
possibleLimitingCondition = "TooFewReplicas"
possibleLimitingReason = "the desired replica count is less than the minimum replica count"
return minimumAllowedReplicas, possibleLimitingCondition, possibleLimitingReason
} else if desiredReplicas > maximumAllowedReplicas {

View File

@ -2494,7 +2494,7 @@ func TestAvoidUncessaryUpdates(t *testing.T) {
Status: v1.ConditionTrue,
LastTransitionTime: *tc.lastScaleTime,
Reason: "TooFewReplicas",
Message: "the desired replica count is more than the maximum replica count",
Message: "the desired replica count is less than the minimum replica count",
},
},
},