From 02d38a76b2776963bb11b254c7a5e07c42e49bfe Mon Sep 17 00:00:00 2001 From: Pasquale Congiusti Date: Thu, 21 Dec 2023 11:05:45 +0100 Subject: [PATCH] chore(controller): knative service watch message --- pkg/controller/integration/integration_controller.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/controller/integration/integration_controller.go b/pkg/controller/integration/integration_controller.go index d76310fda5..d1663ec4cf 100644 --- a/pkg/controller/integration/integration_controller.go +++ b/pkg/controller/integration/integration_controller.go @@ -406,8 +406,16 @@ func add(ctx context.Context, mgr manager.Manager, c client.Client, r reconcile. if ok, err = kubernetes.CheckPermission(checkCtx, c, serving.GroupName, "services", platform.GetOperatorWatchNamespace(), "", "watch"); err != nil { return err } else if ok { + log.Info("The operator has the privileges to watch KnativeService resources.") b.Owns(&servingv1.Service{}, builder.WithPredicates(StatusChangedPredicate{})) + } else { + log.Info("The operator has not the privileges to watch KnativeService resources. Won't be able to work with Knative!") } + } else { + log.Info(` + The cluster has no KnativeService resources installed at the moment. If you install Knative Serving later, + make sure to apply the required RBAC privileges and restart the operator in order to be able to watch Knative Services! + `) } return b.Complete(r)