-
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
CRS associated secret updates will not trigger CRS Reconcile #10557
Comments
This issue is currently awaiting triage. CAPI contributors will take a look as soon as possible, apply one of the 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-sigs/prow repository. |
Hm. I would have assumed that PartialObjectMeta is handled separately |
But the selector filter is effective. Is there something wrong with my understanding? |
No probably not. I just meant that was my initial assumption. I'll take a closer look soon /assign |
(@chrischdi Ah just remembered that we talked about this issue yesterday, let me know if you want to take it over) |
Since CRS uses the cluster-name label selector, would it be reasonable to require the secrets used by CRS to have the same cluster-name label?
|
It would work as a workaround, but seems not ideal because crs applies to multiple clusters |
I created a PR which fixes this. To note: there had been other options too: current state:
Fix:
|
What steps did you take and what happened?
What did you expect to happen?
CRS Controller triggers Reconcile immediately.
Cluster API version
1.6.4
Kubernetes version
1.25.15
Anything else you would like to add?
I guess the problem may lie here:
cluster-api/main.go
Lines 306 to 317 in 6d400b5
The secret CR cache filtered
cluster.x-k8s.io/cluster-name
label, This configuration is passed through the methodmanager.New => cluster.New => cache.New => cache.newCache => internal.NewInformers
and finally takes effect theInformers
object for secret CR.When the ClusterResourceSetReconciler.SetupWithManager function is executed, we observe the secret CR.
And when the controller starts, it will execute the function
manager.Cache.GetInformer => delegatingByGVKCache.GetInformer => informerCache.GetInformer => Informers.Get => Informers.addInformerToMap => Informers.newInformer
Gets the informer object. Since the filtering configuration takes effect on the secret CRInformers
Object, the final generated Informers Object will filter out all object events without thecluster.x-k8s.io/cluster-name"
label.https://github.com/kubernetes-sigs/controller-runtime/blob/dca5e8b2b00a1ab10a617f6c4a6fd0d40f9a974e/pkg/cache/internal/informers.go#L296-L354
And i test when the secret configured
cluster.x-k8s.io/cluster-name
label, if the secret updated, CRS Controller triggers Reconcile immediately.Label(s) to be applied
/kind bug
One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels.
The text was updated successfully, but these errors were encountered: