nicolaferraro commented on a change in pull request #2683: URL: https://github.com/apache/camel-k/pull/2683#discussion_r725111480
########## File path: pkg/controller/integration/integration_controller.go ########## @@ -73,7 +72,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error { Named("integration-controller"). // Watch for changes to primary resource Integration For(&v1.Integration{}, builder.WithPredicates( - predicate.Funcs{ + platform.FilteringFuncs{ Review comment: Right, that was my first attempt actually... The problem is that all controllers use this function to get the client: https://github.com/apache/camel-k/blob/6bdcd1d874c69413f99828d89610893a82dfb363/pkg/client/client.go#L164, so the trait logic does use the cache when doing lookups. Adding a filtering at cache level basically makes non-scoped objects to disappear from the cluster, which is not a wanted feature, as the label is only expected to select the resources that should be **reconciled** by a specific operator, not the one that should be **seen** by it. As an example, Kamelets without the operator.id label couldn't be used with that configuration.. Decoupling the manager cache from the controller client.. I think it adds more drawbacks than advantages. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org