clusterapi: fall back to replica decrement for MachinePool nodes without matching Machine#9693
Conversation
…out matching Machine
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
|
|
This issue is currently awaiting triage. If SIG Autoscaling contributors determines this is a relevant issue, they will accept it by applying the The DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Welcome @mnaissiou! |
|
Hi @mnaissiou. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mnaissiou The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PR fixes the scale-down behavior for Cluster API MachinePool-backed node groups.
The current deletion flow attempts to find a matching Machine object for the node being removed. However, for MachinePool-backed nodes, relying on the presence of an individual Machine is not always appropriate. In this case, scale-down should still proceed by decreasing the MachinePool replica count.
This change makes the MachinePool deletion path fall back to replica decrement when no matching Machine is found, instead of failing the scale-down operation.
This PR adds that fallback so MachinePool scale-down does not fail when no matching Machine is found.
Which issue(s) this PR fixes:
Fixes #9681
Special notes for your reviewer:
This change is limited to the MachinePool scale-down path.
If a matching Machine is found, the existing behavior is preserved.
If no matching Machine is found, the implementation falls back to decrementing the MachinePool replicas count.
Does this PR introduce a user-facing change?
NONE
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: