-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Drain nodegroups during cluster deletion #4205
Conversation
db5d4c0
to
5a8dd85
Compare
fbe5484
to
4643e74
Compare
07146bf
to
80e63c2
Compare
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.
LGTM! Left a few comments 😄
80e63c2
to
96eec77
Compare
96eec77
to
11805e8
Compare
11805e8
to
db563ca
Compare
added |
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.
LGTM ✨
Description
We drain nodegroups prior to deleting them individually but not prior to deleting them when we delete the whole cluster. Draining nodegroups before deleting them is important so that pods can be evicted (and not scheduled on those pods again) and resources, such as IP addresses, can be released. Not draining nodes before deleting them may block the deletion of some resources and cause leftover resources such as IP addresses.
This PR focuses on unmanaged nodegroups because managed nodegroups get drained by EKS anyway.
I tried to do a bit of refactoring to backfill tests. I also extracted the CF call that gets
allStacks
since it was used elsewhere in the code where we deleteunowned
clusters.Related issues: #1849, #536, #523, #3726
Demo
The following demo is for a eksctl-created cluster with unmanaged nodegroups.
Manually tested it for an unowned cluster with unmanaged nodegroups as well.
Checklist
README.md
, or theuserdocs
directory)area/nodegroup
) and kind (e.g.kind/improvement
)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯