-
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 nodes in parallel #4864
Drain nodes in parallel #4864
Conversation
0316346
to
6d4c77c
Compare
@@ -524,6 +525,12 @@ func NewDeleteNodeGroupLoader(cmd *Cmd, ng *api.NodeGroup, ngFilter *filter.Node | |||
return ErrMustBeSet("--name") | |||
} | |||
|
|||
if flag := l.CobraCommand.Flag("parallel"); flag != nil && flag.Changed { |
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.
its always an int since the flag type enforces it
efc559a
to
9f8af53
Compare
1c1d2be
to
6129061
Compare
b9d477d
to
76e600b
Compare
76e600b
to
4d5b7d0
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.
garbage
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.
Awesome! Wanted to ask a Qs before reviewing more! It's also worth adding something to the docs here https://eksctl.io/usage/managing-nodegroups/#deleting-and-draining :)
93f80ac
to
29641dd
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 👍🏻
@aclevername can we wait to merge this on Monday so that it goes in the next release? :) Today's release needs a little bit of extra TLC. :D |
This reverts commit 391a6ce.
* Revert "Revert "Drain nodes in parallel (#4864)" (#4964)" This reverts commit 00f5fcf. * set value in delete cluster * Update pkg/drain/nodegroup.go Co-authored-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * Update pkg/drain/nodegroup.go Co-authored-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * update unit tests Co-authored-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
Description
Closes #4705
Adds support for providing
--parallel <value>
(open to renaming!) flag todelete/drain nodegroup
that will mean the nodegroups are drained in parallel. I've set a upper limit of 25 to match our k8s client. example belowTesting
50 node cluster with a 1000 pods deployment
Before:
eksctl drain nodegroup --cluster jk --name ng-1
would take4:40.22
to complete:After:
With
--parallel
set to 20eksctl drain nodegroup --cluster jk --name ng-1 --parallel 20
would take1:24.77
to complete: