-
Notifications
You must be signed in to change notification settings - Fork 108
🐛 Prevent propagation of OwnerReferences from provider manifests #352
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
🐛 Prevent propagation of OwnerReferences from provider manifests #352
Conversation
- Prevent applied manifes from duplicating owner references from the provider object.
Hey! Probably we need to fix this issue here: https://github.com/kubernetes-sigs/cluster-api-operator/blob/main/internal/controller/healthcheck/healthcheck_controller.go#L71-L76 Probably it's okay to have multiple owners for deployments, but there should be only one Provider owner. So, if we have just one owner, we need to add a check that this owner is a Prover CR. Otherwise we have to iterate over the owners and find the Provider one (or return an error if nothing found) |
I tried to refactor the reconciler which will fix this issue. Here is a separate PR for that: #354 |
/retest |
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Fedosin 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 |
/retest |
The patch is good, thanks for fixing the bug! |
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
LGTM label has been added. Git tree hash: ac84d968ffbb0634713121d2b994f01a0288d0ad
|
What this PR does / why we need it:
Healthcheck implementation expects deployment availability and an ownership reference pointing to the owner resource, to mark the provider as ready. However if the provider manifest is owned by some other resource, the second ownership reference appears on the deployment too, which is unexpected.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #350