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
kubernetes-nodes: raising minReplicas does not raise the MachineDeployment's replicas on upgrade #4786
Raising minReplicas on an existing node pool does not raise the MachineDeployment's replicas, although the comment above spec in nodegroup.yaml says CAPI clamps the live value into [min, max] on update.
The clamp in CAPI's calculateMachineDeploymentReplicas (v1.10.1, internal/webhooks/machinedeployment.go) runs only when the incoming object has spec.replicas unset. helm-controller applies the chart through Helm's three-way merge, so the object the webhook sees still carries the live value, and the function returns it unchanged at its first check.
I saw this in the computeplane e2e suite. Its pool is first rendered with minReplicas: 0, then upgraded to min and max 2. After the upgrade the MachineDeployment had the min-size annotation at "2" and spec.replicas: 0. What then lifts such a pool is the cluster-autoscaler, through --enforce-node-group-min-size or a scale-up for pending pods. That path was deadlocked by a separate autoscaler defect, fixed in #4768.
With the autoscaler fixed the pool does reach its min, so this is mostly a wrong comment: the guarantee it describes holds for create, not for update. It also means a pool raised above its live size waits on the autoscaler's next loop rather than on the upgrade itself.
Activity
fix(kubernetes, e2e): unblock autoscaling below min size, size the co…