nicolaferraro commented on a change in pull request #1952:
URL: https://github.com/apache/camel-k/pull/1952#discussion_r565946168



##########
File path: pkg/controller/integration/integration_controller.go
##########
@@ -217,6 +218,15 @@ func add(mgr manager.Manager, r reconcile.Reconciler) 
error {
                return err
        }
 
+       // Watch ServiceBindings created
+       err = c.Watch(&source.Kind{Type: &sb.ServiceBinding{}}, 
&handler.EnqueueRequestForOwner{

Review comment:
       Ok, I see you're already targeting this. There's also a safer way to 
look if you can watch a resource by using these APIs: 
https://github.com/apache/camel-k/blob/51a5c234e362aa0815da4e7d8951851dc4b24a39/pkg/util/kubernetes/permission.go#L33
   
   Also adding a watch on sub-resources (if possible) that change can help in 
case the servicebinding operator is installed after the camel k operator is 
started.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to