-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🐛 KCP: remove etcd member in pre-terminate hook #11137
🐛 KCP: remove etcd member in pre-terminate hook #11137
Conversation
/test ? |
@sbueringer: The following commands are available to trigger required jobs:
The following commands are available to trigger optional jobs:
Use
In response to this:
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. |
/test pull-cluster-api-e2e-conformance-ci-latest-main |
7b65f1a
to
25b17b9
Compare
/test pull-cluster-api-e2e-conformance-ci-latest-main |
25b17b9
to
5610633
Compare
/test pull-cluster-api-e2e-conformance-ci-latest-main |
5610633
to
d5f0d74
Compare
/test pull-cluster-api-e2e-conformance-ci-latest-main |
controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go
Outdated
Show resolved
Hide resolved
// Return early if there are other pre-terminate hooks for the Machine. | ||
// The KCP pre-terminate hook should be the one executed last, so that kubelet | ||
// is still working while other pre-terminate hooks are run. | ||
if machineHasOtherPreTerminateHooks(deletingMachine) { |
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 think we should somehow document that KCP controlled machines are adding a hook that expects to be always run as last (to ensure kubelet is running).
This should go in the PR description first but probably in a few other places too (the latter could be part of this PR or a quick follow-up, up to you); Probably this should go:
- At the end of the go comment for PreTerminateDeleteHookAnnotation
- 1.9 upgrade instruction
- release notes for the patch release
(and we should bring this up at the office hours)
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.
Sounds like a follow-up to me
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.
Maybe you can take that one. Probably easier because you know better where you want to add it :)
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.
Opened a follow-up PR (#11153) + added it to the agenda
/test pull-cluster-api-e2e-main Failed on old mgmt version (flake not affected by this PR) |
/test pull-cluster-api-e2e-mink8s-main
|
/test pull-cluster-api-e2e-latestk8s-main |
/test pull-cluster-api-e2e-conformance-ci-latest-main |
/test pull-cluster-api-e2e-conformance-ci-latest-main |
/test pull-cluster-api-e2e-conformance-ci-latest-main |
Great work! |
LGTM label has been added. Git tree hash: 7846e7efa4c01e76b9d2ac602660759c05efbe46
|
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chrischdi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold on your convenience |
/hold cancel All tests green |
What this PR does / why we need it:
Note, this fix required the introduction of a pre-terminate hook that is automatically added and managed by the KCP controller for KCP control plane Machines. If your control plane Machines are using Kubernetes 1.31, KCP will make sure that its pre-terminate hook is run last. This is done to ensure that the terminating Node has a working kubelet / Node
while other pre-terminate hooks are executed.
More details about the issue can be found in Drain not being performed for KCP machines with K8s v1.31.x .
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 #11138