Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix adding default namespace as subjects to openshift-pipelines-clusterinterceptors clusterrolebinding #422

Merged
merged 1 commit into from
Sep 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions pkg/reconciler/openshift/tektonconfig/rbac.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func (r *rbac) ensureSA(ctx context.Context, ns *corev1.Namespace) (*corev1.Serv
return nil, err
}
if err != nil && errors.IsNotFound(err) {
logger.Info("creating sa", "sa", pipelineSA, "ns", ns.Name)
logger.Info("creating sa ", pipelineSA, " ns", ns.Name)
return createSA(ctx, saInterface, ns.Name, r.ownerRef)
}

Expand Down Expand Up @@ -466,7 +466,9 @@ func (r *rbac) ensureClusterRoleBindings(ctx context.Context, sa *corev1.Service
rbacClient := r.kubeClientSet.RbacV1()
logger.Info("finding cluster-role ", clusterInterceptors)
if _, err := rbacClient.ClusterRoles().Get(ctx, clusterInterceptors, metav1.GetOptions{}); errors.IsNotFound(err) {
return r.createClusterRole(ctx)
if e := r.createClusterRole(ctx); e != nil {
return e
}
}

logger.Info("finding cluster-role-binding ", clusterInterceptors)
Expand Down