-
Notifications
You must be signed in to change notification settings - Fork 331
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
Reconciler needs to provide a filter function for leader election #1891
Comments
@n3wscott fyi |
Thanks for the bug report, I think we can fix this quick, but it will need to be in a few days because of the current release. |
This issue is stale because it has been open for 90 days with no |
/remove-lifecycle-stale Hitting this issue while developing a secrets reconciler |
My controller loops indefinitely trying to reconcile every secret in the cluster, although I've set the following filters: https://github.com/slinkydeveloper/control-data-plane-communication/pull/11/files#diff-758961aac53d57d417fc85fa07093ab347dbd01929ebfc54ffe0cf2af64675b6R77 |
This issue is stale because it has been open for 90 days with no |
/remove-lifecycle stale |
This issue is stale because it has been open for 90 days with no |
/reopen |
Expected Behavior
Tekton has created a new custom resource called Run for running custom tasks. Each custom task implementer will provide a reconciler that watches for and processes Run objects that refer to its kind of custom task, through the use of the filter function given to the run informer.
Actual Behavior
We've found a case where a reconciler is given all Run objects, not just the ones it has requested through the filter function given to the run informer. This happens during leader election in this code:
https://github.com/tektoncd/pipeline/blob/master/pkg/client/injection/reconciler/pipeline/v1alpha1/run/controller.go#L72
A custom task implementer will not want to be given Run objects that it isn't written to handle. It needs to be able to pass a filter function to filter the objects on this path.
Steps to Reproduce the Problem
Any controller using leader election goes through this path. Run objects may be the first case though where there may be multiple independent controllers that are only interested in distinct subsets of the objects.
Additional Info
The text was updated successfully, but these errors were encountered: