-
Notifications
You must be signed in to change notification settings - Fork 1.4k
📖 docs: add delete-machine info to Scaling Nodes page #13195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
📖 docs: add delete-machine info to Scaling Nodes page #13195
Conversation
|
Hi @Kausheel. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with 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. |
|
/area documentation |
The change adds a brief description of using `cluster.x-k8s.io/delete-machine` labels to control Machine scaling on the [Scaling Nodes](https://cluster-api.sigs.k8s.io/tasks/automated-machine-management/scaling) page. The label is mentioned in the [supported labels](https://main.cluster-api.sigs.k8s.io/reference/api/labels-and-annotations.html?highlight=labels#supported-labels) but I think it's relevant to include it in the Scaling Nodes page too.
a3c1b64 to
e15292e
Compare
|
/ok-to-test We should probably add a disclaimer that the label only acts on the MachineSet level. I mention this because this misunderstanding lead to a major bug in the autoscaler |
|
|
||
| You can scale MachineSets and MachineDeployments in or out by expressing intent via `.spec.replicas` or updating the scale subresource e.g `kubectl scale machinedeployment foo --replicas=5`. | ||
|
|
||
| If you need to prioritize which Machines get deleted during scale down, add the `cluster.x-k8s.io/delete-machine` label to the Machine. KCP or a MachineSet will delete labeled control plane or worker Machines first, and this label has top priority over all delete policies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to add a note that explains that the annotation is considered only when scaling down a machine set; the decision about which machine set to scale down in a machine deployment is driven by other factors (e.g. primarily the fact that the MachineSet spec is UpToDate or not).
628e113 to
6b19f38
Compare
|
Thank you @fabriziopandini and @sbueringer for the suggestion, I've adding a small note to the |
|
|
||
| You can scale MachineSets and MachineDeployments in or out by expressing intent via `.spec.replicas` or updating the scale subresource e.g `kubectl scale machinedeployment foo --replicas=5`. | ||
|
|
||
| If you need to prioritize which Machines get deleted during scale-down, add the `cluster.x-k8s.io/delete-machine` label to the Machine. KCP or a MachineSet will delete labeled control plane or worker Machines first, and this label has top priority over all delete policies. Note: The label only affects MachineSet scale-down; in a MachineDeployment, the choice of MachineSet to scale-down may bypass labeled Machines. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we move this note to a new line?
| If you need to prioritize which Machines get deleted during scale-down, add the `cluster.x-k8s.io/delete-machine` label to the Machine. KCP or a MachineSet will delete labeled control plane or worker Machines first, and this label has top priority over all delete policies. Note: The label only affects MachineSet scale-down; in a MachineDeployment, the choice of MachineSet to scale-down may bypass labeled Machines. | |
| If you need to prioritize which Machines get deleted during scale-down, add the `cluster.x-k8s.io/delete-machine` label to the Machine. KCP or a MachineSet will delete labeled control plane or worker Machines first, and this label has top priority over all delete policies. | |
| **Note:** The label only affects MachineSet scale-down. In a MachineDeployment, the choice of MachineSet to scale down may bypass labeled Machines. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion @hackeramitkumar , I've added the line spacing now.
|
Thx! /lgtm |
|
LGTM label has been added. DetailsGit tree hash: cc4d628c7332ddf46b7af22c334c8718f6710638 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbueringer The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does:
The change adds a brief description of using
cluster.x-k8s.io/delete-machinelabels to control Machine scaling on the Scaling Nodes page. The label is mentioned in the supported labels but I think it's relevant to include it in the Scaling Nodes page too.Which issue(s) this PR fixes
Fixes #10306