nicolaferraro commented on a change in pull request #1438: URL: https://github.com/apache/camel-k/pull/1438#discussion_r418101181
########## File path: pkg/controller/integration/integration_controller.go ########## @@ -200,6 +203,35 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error { return err } + // Watch deployment to update the ready condition + err = c.Watch(&source.Kind{Type: &appsv1.Deployment{}}, &handler.EnqueueRequestForOwner{ + OwnerType: &v1.Integration{}, + IsController: false, + }) + if err != nil { + return err + } + + // Watch Knative service to update the ready condition + err = c.Watch(&source.Kind{Type: &servingv1.Service{}}, &handler.EnqueueRequestForOwner{ + OwnerType: &v1.Integration{}, + IsController: false, + }) + if _, ok := err.(*meta.NoKindMatchError); ok { + log.Info("No watch has been set on Knative services because the type is not known") + } else if err != nil { + log.Error(err, "Cannot set watch on Knative services") + } + + // Watch cronjob to update the ready condition + err = c.Watch(&source.Kind{Type: &v1beta1.CronJob{}}, &handler.EnqueueRequestForOwner{ + OwnerType: &v1.Integration{}, + IsController: false, + }) + if err != nil { + return err + } + Review comment: Yeah, there are issues with non-knative environments. I don't know.. maybe we can assume that a ready replicaset implies a good ksvc.. ---------------------------------------------------------------- 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: us...@infra.apache.org