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

Centralize Node Cordon & Drain #994

Closed
michaelgugino opened this issue Jun 7, 2019 · 7 comments · Fixed by #1096
Closed

Centralize Node Cordon & Drain #994

michaelgugino opened this issue Jun 7, 2019 · 7 comments · Fixed by #1096
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@michaelgugino
Copy link
Contributor

michaelgugino commented Jun 7, 2019

/kind feature

Describe the solution you'd like
Currently, provider Actuators may (or may not) implement Node cordon & drain before delete. We should do this in the machine-controller.

Anything else you would like to add:
To be provider neutral, we may need to add an extension to the Actuator interface such as "preDrain()" that allows a provider to do things like label/annotation VMs (such as in an auto scale group) or similar action.

Here's how OpenShift is doing it today: https://github.com/openshift/cluster-api/blob/openshift-4.0-cluster-api-0.0.0-alpha.4/pkg/controller/machine/controller.go#L195

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 7, 2019
@timothysc timothysc added this to the v1alpha2 milestone Jun 7, 2019
@ncdc ncdc changed the title Centralize Node Drain Centralize Node Cordon & Drain Jun 7, 2019
@timothysc timothysc added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Jun 7, 2019
@detiber
Copy link
Member

detiber commented Jun 7, 2019

The main impediment to this today is the lack of remote node references. It'll work for self-managed clusters, but if a separate management cluster is used it will not work today.

@ncdc
Copy link
Contributor

ncdc commented Jun 7, 2019

Remote node ref issue: #520

@detiber
Copy link
Member

detiber commented Jun 26, 2019

/assign @michaelgugino

@michaelgugino
Copy link
Contributor Author

/active

@ncdc
Copy link
Contributor

ncdc commented Jul 1, 2019

@michaelgugino FYI it's slash-lifecycle active - thanks!

@michaelgugino
Copy link
Contributor Author

/lifecycle active

@k8s-ci-robot k8s-ci-robot added the lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. label Jul 1, 2019
@ncdc ncdc removed the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Aug 23, 2019
@dlipovetsky
Copy link
Contributor

There was a #cluster-api Kubernetes slack thread on this topic on 09/24/19-09/25/19.

Quoting myself here:

If drain is imperative and client-side (which it is today, AFAIK), then a CAPI controller can/should implement drain. But if drain becomes declarative and server-side (e.g. something that happens as the result of Taints applied to a Node), then CAPI controller can/should apply the Taints.

Moving drain server-side is in progress upstream: kubernetes/kubernetes#25625. There is a Node Maintenance Controller KEP in progress right now: kubernetes/enhancements#1080.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants