system-upgrade-controller icon indicating copy to clipboard operation
system-upgrade-controller copied to clipboard

Node drain podselector field

Open sangeetha-thackarajan opened this issue 2 years ago • 4 comments

// 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.

sangeetha-thackarajan avatar Jun 02 '22 04:06 sangeetha-thackarajan

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.

reefland avatar Jul 20 '22 16:07 reefland

Any updates on this ?

raif-ahmed avatar Feb 01 '23 16:02 raif-ahmed

This was added in a commit two weeks ago or so: https://github.com/rancher/system-upgrade-controller/pull/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 avatar Apr 08 '23 16:04 jstewart612

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

jstewart612 avatar May 12 '23 23:05 jstewart612