Skip to content

Commit

Permalink
HCCO: Reference manifests in crb subject definition
Browse files Browse the repository at this point in the history
  • Loading branch information
alvaroaleman committed Aug 8, 2022
1 parent 8ef6453 commit 28eea51
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package rbac

import (
hccomanifests "github.com/openshift/hypershift/control-plane-operator/hostedclusterconfigoperator/controllers/resources/manifests"
rbacv1 "k8s.io/api/rbac/v1"
)

Expand Down Expand Up @@ -52,7 +53,7 @@ func ReconcileCSRApproverClusterRoleBinding(r *rbacv1.ClusterRoleBinding) error
r.RoleRef = rbacv1.RoleRef{
APIGroup: rbacv1.SchemeGroupVersion.Group,
Kind: "ClusterRole",
Name: "system:openshift:controller:cluster-csr-approver-controller",
Name: hccomanifests.CSRApproverClusterRoleBinding().Name,
}
r.Subjects = []rbacv1.Subject{
{
Expand Down Expand Up @@ -129,7 +130,7 @@ func ReconcileIngressToRouteControllerClusterRoleBinding(r *rbacv1.ClusterRoleBi
r.RoleRef = rbacv1.RoleRef{
APIGroup: rbacv1.SchemeGroupVersion.Group,
Kind: "ClusterRole",
Name: "system:openshift:openshift-controller-manager:ingress-to-route-controller",
Name: hccomanifests.IngressToRouteControllerClusterRole().Name,
}
r.Subjects = []rbacv1.Subject{
{
Expand Down Expand Up @@ -183,7 +184,7 @@ func ReconcileNamespaceSecurityAllocationControllerClusterRoleBinding(r *rbacv1.
r.RoleRef = rbacv1.RoleRef{
APIGroup: rbacv1.SchemeGroupVersion.Group,
Kind: "ClusterRole",
Name: "system:openshift:controller:namespace-security-allocation-controller",
Name: hccomanifests.NamespaceSecurityAllocationControllerClusterRole().Name,
}
r.Subjects = []rbacv1.Subject{
{
Expand Down

0 comments on commit 28eea51

Please sign in to comment.