-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Stop using owner references to determine ClusterResourceSetBinding cluster #7669
Comments
Sounds fine to me in general. Do you know when we currently use .spec.clusterName vs the cluster name label? I think ~ core CRDs are using the spec field? (not sure IIRC) |
We do it in MachinePools in exp - but not in KCP or CAPBK . |
+1 to add a field; we can infer the value from the ownerRef while dropping it from existing objects. /triage accepted |
@fabriziopandini: GuidelinesPlease ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met. If this request no longer meets these requirements, the label can be removed In response to this:
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. |
I think we can update the field in the CRS controller to update existing CRSbindings with the new field. |
hi, I'm a newbie. Can I pick up this issues? I'm not sure I can solve it. |
Four Tasks:
|
Thanks for volunteering @chaunceyjiang - I think we're agreed on the approach, so it would be awesome if you could pick this up! /assign @chaunceyjiang |
@killianmuldoon Can we close this given #7680 has been merged? |
Yup - this is fully covered. Thanks again @chaunceyjiang! /close |
@killianmuldoon: Closing this issue. In response to this:
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. |
The current implementation of the ClusterResourceSetBinding controller uses the owner references in objectMeta to determine which cluster the resource binding applies to.
As a result the ClusterResourceSetBinding requires two ownerReferences - one to the ClusterResourceSet and a second to the Cluster.
Currently the ClusterResourceSetBinding is always named after the Cluster it's associated with, so this name could be used to link the two. Alternatively the ClusterResourceSetBinding
.spec
could contain a clusterName field to link it to the Cluster. The second approach is more stable and explicit IMO.The approach I'd propose is:
clusterName
to the ClusterResourceSetBinding specspec.clusterName
to link ClusterResourceSetBinding to the Cluster's they link to - and use that link to decide when to delete.The text was updated successfully, but these errors were encountered: