You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
KPA initial scale can exceed max-scale and prevent activation #16709
The KPA scaler does not consistently enforce max-scale when applying a revision's initial scale.
When initialScale exceeds a configured positive maxScale, the initial-scale adjustment can raise minScale above maxScale. This violates the bounds expected by the scaler and can cause the revision to scale beyond its configured maximum.
There is also a related activation-threshold inconsistency. The KPA's activeThreshold() uses the initial scale without capping it at maxScale. If the scaler is limited to fewer replicas than the activation threshold requires, the PodAutoscaler may remain in the Activating state until timing out.
Steps to reproduce
Configure a revision with:
initial-scale: "5"
max-scale: "2"
Observe the desired replica count and PodAutoscaler activation behavior.
Expected behavior
The initial desired scale should not exceed a configured positive maxScale.
The activation threshold should be consistent with the effective scale bounds.
maxScale = 0 should continue to mean unlimited.
Existing behavior for unreachable revisions and already-initialized scale targets should remain unchanged.
Actual behavior
The initial-scale adjustment can exceed the configured maximum. The activation threshold can also require more ready replicas than the maximum allows, potentially leaving the PodAutoscaler stuck in Activating.
Proposed fix
Clamp the initial scale to the configured positive maximum and ensure the KPA activation threshold uses a consistent effective bound. Add regression tests covering maximum-scale enforcement, unlimited maximum scale, and activation readiness.
I have reproduced the behavior and am validating a fix with regression tests.
Activity
amarkdotdev commentedon Nov 3, 2026
Opened #16742. /assign