claudio4j commented on code in PR #4914: URL: https://github.com/apache/camel-k/pull/4914#discussion_r1396501841
########## pkg/install/operator.go: ########## @@ -200,44 +199,6 @@ func OperatorOrCollect(ctx context.Context, cmd *cobra.Command, c client.Client, envvar.SetVal(&d.Spec.Template.Spec.Containers[0].Env, "WATCH_NAMESPACE", "") } } - - // Turn Role & RoleBinding into their equivalent cluster types - if r, ok := o.(*rbacv1.Role); ok { - if strings.HasPrefix(r.Name, "camel-k-operator") { - o = &rbacv1.ClusterRole{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: cfg.Namespace, - Name: r.Name, - Labels: map[string]string{ - "app": "camel-k", - }, - }, - Rules: r.Rules, - } - } - } - - if rb, ok := o.(*rbacv1.RoleBinding); ok { - if strings.HasPrefix(rb.Name, "camel-k-operator") { - rb.Subjects[0].Namespace = cfg.Namespace - - o = &rbacv1.ClusterRoleBinding{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: cfg.Namespace, - Name: fmt.Sprintf("%s-%s", rb.Name, cfg.Namespace), Review Comment: It comes from #2683, to allow multiple global operators in multiple namespaces, to create a CRB and associate to a SA which was installed in the global operator namespace. -- 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