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

UPSTREAM: <carry>: openshift: Machine controller: drain node before machine deletion #11

Merged
merged 2 commits into from
Mar 12, 2019

Conversation

ingvagabund
Copy link
Member

@ingvagabund ingvagabund commented Mar 7, 2019

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.

@openshift-ci-robot openshift-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Mar 7, 2019
@ingvagabund
Copy link
Member Author

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

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 7, 2019
@enxebre
Copy link
Member

enxebre commented Mar 7, 2019

These are commits we want to carry on a rebase. Can you update the commits to follow UPSTREAM: <carry>: openshift: ?
https://github.com/openshift/origin/blob/master/docs/rebase.md#3-cherry-picks

@ingvagabund ingvagabund changed the title Machine controller: drain node before machine deletion UPSTREAM: <carry>: openshift: Machine controller: drain node before machine deletion Mar 7, 2019
@ingvagabund
Copy link
Member Author

/retest

@ingvagabund
Copy link
Member Author

/test unit

1 similar comment
@enxebre
Copy link
Member

enxebre commented Mar 12, 2019

/test unit

@enxebre
Copy link
Member

enxebre commented Mar 12, 2019

/approve

@openshift-ci-robot
Copy link

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 12, 2019
@ingvagabund
Copy link
Member Author

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 12, 2019
…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`.
@frobware
Copy link

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 12, 2019
@openshift-merge-robot openshift-merge-robot merged commit eaaebe5 into openshift:master Mar 12, 2019
@ingvagabund ingvagabund deleted the node-draining branch March 14, 2019 09:52
ingvagabund added a commit to openshift/cluster-api-provider-kubemark that referenced this pull request Mar 14, 2019
Node draining logic has been moved to the machine controller.
See openshift/cluster-api#11 for more info.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants