-
Notifications
You must be signed in to change notification settings - Fork 1.4k
🐛 Ensure MachineSet controller won't orphan resources #2038
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
🐛 Ensure MachineSet controller won't orphan resources #2038
Conversation
|
Welcome @zjs! |
|
Hi @zjs. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/ok-to-test |
|
/ok-to-test |
|
Seems reasonable. That's an LGTM from me. |
d3f55ea to
748d46f
Compare
To ensure that the MachineSet controller won't orphan infrastructure config or bootstrap config resources as the result of an incomplete reconcile followed by cluster deletion, add an OwnerReference during creation of these resources by the MachineSet controller.
748d46f to
aa3eebf
Compare
vincepri
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
|
@ncdc over to you for approval |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ncdc, zjs 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 |
What this PR does / why we need it:
To ensure that the
MachineSetcontroller won't orphan infrastructure config or bootstrap config resources as the result of an incomplete reconcile followed by cluster deletion, add anOwnerReferenceduring creation of these resources by theMachineSetcontroller.This case may be uncommon when Cluster API is used directly by a user (as the window where deletion of the
Clusterwill lead to an orphaned resource is short), but may be more common when an automation layer sits above Cluster API (as its "reaction time" may be fast).Which issue(s) this PR fixes:
I didn't file a separate issue for this, but would be happy to do so.
Additional details:
I borrowed pieces of this change from #1959 on
master, introducing a new method that supports passingownersto avoid backwards-compatibility issues (becauseCloneTemplateis a public function and I'm proposing submission to a release branch).