forked from kubernetes-sigs/cluster-api-provider-aws
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move node draining from actuator into machine controller
Node draining is a generic operation independent of a specific actuator. Thus, it makes sense to move the code from actuator into the machine controllers. 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.
- Loading branch information
1 parent
17d5aac
commit 289f0e5
Showing
4 changed files
with
75 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 68 additions & 5 deletions
73
vendor/github.com/openshift/cluster-api/pkg/controller/machine/controller.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.