Skip to content

Commit

Permalink
Fix adding of subjects to openshift-pipelines-clusterinterceptors
Browse files Browse the repository at this point in the history
  • Loading branch information
savitaashture authored and tekton-robot committed Sep 24, 2021
1 parent f2fbc39 commit 0390095
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit 0390095

Please sign in to comment.