Skip to content

✨Introduce NodeDeletionStrategy to allow drain node when deleting cluster #12142

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

lubronzhan
Copy link
Contributor

What this PR does / why we need it:
Introduce a nodeDeletionStrategy at cluster level, to allow opt-in node drain during cluster deletion. Keep the default behavior the same as before: delete machine without waiting for drain.
Available option:

  • force
  • graceful

When implementing this, I noticed existing fields like NodeDrainTimeout at MachinePoolTopology/ControlPlaneTopology, I felt like it might be more suitable to put nodeDeletionStrategy along with NodeDrainTimeout at the same level? But if that's the case, does it make more sense to also put it inside MD/MS/Machine level? And implement the propagation logic as part of #10753?
Open to thoughts

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes ##9692

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-area PR is missing an area label labels May 2, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign vincepri for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 2, 2025
@lubronzhan
Copy link
Contributor Author

Will fix the lint tmr

@lubronzhan
Copy link
Contributor Author

/area machine

@k8s-ci-robot k8s-ci-robot added area/machine Issues or PRs related to machine lifecycle management and removed do-not-merge/needs-area PR is missing an area label labels May 2, 2025
lubronzhan added 2 commits May 2, 2025 11:31
Signed-off-by: Lubron Zhan <[email protected]>
Signed-off-by: Lubron Zhan <[email protected]>
@lubronzhan lubronzhan force-pushed the topic/lubron/fix-9692 branch from 293dcdc to a35d904 Compare May 2, 2025 18:34
Signed-off-by: Lubron Zhan <[email protected]>
@lubronzhan lubronzhan force-pushed the topic/lubron/fix-9692 branch from 275cc74 to 9ed080e Compare May 2, 2025 20:58
Signed-off-by: Lubron Zhan <[email protected]>
@lubronzhan lubronzhan force-pushed the topic/lubron/fix-9692 branch 2 times, most recently from cbedcb7 to 45806fc Compare May 7, 2025 04:34
@lubronzhan lubronzhan force-pushed the topic/lubron/fix-9692 branch from 45806fc to 1b05729 Compare May 7, 2025 06:40
@lubronzhan
Copy link
Contributor Author

The fuzzy conversion related test is failing because this field exist in v1beta2 api, not in v1beta1 api. Should I also add this field to v1beta1?

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented May 7, 2025

@lubronzhan: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-verify-main 1b05729 link true /test pull-cluster-api-verify-main
pull-cluster-api-test-main 1b05729 link true /test pull-cluster-api-test-main

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions 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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/machine Issues or PRs related to machine lifecycle management cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants