mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 13:45:06 +00:00
Merge pull request #79859 from sukeesh/hpa-error-log-fix
HPA incorrectly reported condition status
This commit is contained in:
@@ -732,13 +732,13 @@ func convertDesiredReplicasWithRules(currentReplicas, desiredReplicas, hpaMinRep
|
|||||||
possibleLimitingReason = "the desired replica count is increasing faster than the maximum scale rate"
|
possibleLimitingReason = "the desired replica count is increasing faster than the maximum scale rate"
|
||||||
} else {
|
} else {
|
||||||
maximumAllowedReplicas = hpaMaxReplicas
|
maximumAllowedReplicas = hpaMaxReplicas
|
||||||
|
|
||||||
possibleLimitingCondition = "TooManyReplicas"
|
possibleLimitingCondition = "TooManyReplicas"
|
||||||
possibleLimitingReason = "the desired replica count is more than the maximum replica count"
|
possibleLimitingReason = "the desired replica count is more than the maximum replica count"
|
||||||
}
|
}
|
||||||
|
|
||||||
if desiredReplicas < minimumAllowedReplicas {
|
if desiredReplicas < minimumAllowedReplicas {
|
||||||
possibleLimitingCondition = "TooFewReplicas"
|
possibleLimitingCondition = "TooFewReplicas"
|
||||||
|
possibleLimitingReason = "the desired replica count is less than the minimum replica count"
|
||||||
|
|
||||||
return minimumAllowedReplicas, possibleLimitingCondition, possibleLimitingReason
|
return minimumAllowedReplicas, possibleLimitingCondition, possibleLimitingReason
|
||||||
} else if desiredReplicas > maximumAllowedReplicas {
|
} else if desiredReplicas > maximumAllowedReplicas {
|
||||||
|
@@ -2494,7 +2494,7 @@ func TestAvoidUncessaryUpdates(t *testing.T) {
|
|||||||
Status: v1.ConditionTrue,
|
Status: v1.ConditionTrue,
|
||||||
LastTransitionTime: *tc.lastScaleTime,
|
LastTransitionTime: *tc.lastScaleTime,
|
||||||
Reason: "TooFewReplicas",
|
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",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user