-
Notifications
You must be signed in to change notification settings - Fork 22
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
UPSTREAM: <carry>: openshift: Machine controller: drain node before machine deletion #11
Conversation
/hold We need to wait until all the tests in openshift/cluster-api-provider-aws#174 pass (to verify the node draining is still functional). |
These are commits we want to carry on a rebase. Can you update the commits to follow |
ce15a65
to
27e9496
Compare
/retest |
/test unit |
1 similar comment
/test unit |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enxebre The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold cancel |
…achine deletion The node draining code itself is imported from github.com/openshift/kubernetes-drain. At the same time it's currently impossible to use the controller-runtime client for node draining due to missing Patch operation (kubernetes-sigs/controller-runtime#235). Thus, the machine controller needs to initialize kubeclient as well in order to implement the node draining logic. Once the Patch operation is implemented, the draining logic can be updated to replace kube client with controller runtime client. Also, initialize event recorder to generate node draining event.
By running `dep ensure` followed by `make gazelle`.
27e9496
to
a439d98
Compare
/lgtm |
Node draining logic has been moved to the machine controller. See openshift/cluster-api#11 for more info.
What this PR does / why we need it:
The node draining code itself is imported from github.com/openshift/kubernetes-drain.
At the same time it's currently impossible to use the controller-runtime client for node draining due to missing Patch operation (kubernetes-sigs/controller-runtime#235). Thus, the machine controller needs to initialize kubeclient as well in order to implement the node draining logic. Once the Patch operation is implemented, the draining logic can be updated to replace kube client with controller runtime client.
Also, initialize event recorder to generate node draining event.