Skip to content
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

Node drain podselector field #207

Open
sangeetha-thackarajan opened this issue Jun 2, 2022 · 4 comments
Open

Node drain podselector field #207

sangeetha-thackarajan opened this issue Jun 2, 2022 · 4 comments

Comments

@sangeetha-thackarajan
Copy link

// DrainSpec encapsulates kubectl drain parameters minus node/pod selectors.
type DrainSpec struct {
Timeout *time.Duration json:"timeout,omitempty"
GracePeriod *int32 json:"gracePeriod,omitempty"
DeleteLocalData *bool json:"deleteLocalData,omitempty"
IgnoreDaemonSets *bool json:"ignoreDaemonSets,omitempty"
Force bool json:"force,omitempty"
DisableEviction bool json:"disableEviction,omitempty"
SkipWaitForDeleteTimeout int json:"skipWaitForDeleteTimeout,omitempty"
}

will there be an option to use --podselector in DrainSpec? right now only !upgrade.cattle.io/controller=system-upgrade-controller pods (and the Daemonsets) are not evicted. I want to skip some other critical controller-pods(that are hosting my images and RPMs) as well in SUC plan.

@reefland
Copy link

Longhorn needs the podselector field for maintenance too. https://longhorn.io/docs/1.3.0/volumes-and-nodes/maintenance/

You will need to use --ignore-daemonsets and --pod-selector='app!=csi-attacher,app!=csi-provisioner' options to drain the node.

@raif-ahmed
Copy link

Any updates on this ?

@jstewart612
Copy link

jstewart612 commented Apr 8, 2023

This was added in a commit two weeks ago or so: #231 which looks like it will go out in the 0.11.0 release.

You can try the dev1 prerelease if you're feeling lucky :)

@jstewart612
Copy link

jstewart612 commented May 12, 2023

#239 fixed some bugs in #231, the main release is now 0.11.0, and it resolves these issues for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants