Skip to content

Commit c80b61c

Browse files
committed
chore: Keep the rbac.authorization.k8s.io rules within a ClusterRole close to each other
1 parent fe683fd commit c80b61c

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

deploy/helm/opa-operator/templates/roles.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ rules:
5252
- get
5353
- list
5454
- patch
55+
# Required to bind the product ClusterRole to the per-cluster ServiceAccount.
56+
- apiGroups:
57+
- rbac.authorization.k8s.io
58+
resources:
59+
- clusterroles
60+
verbs:
61+
- bind
62+
resourceNames:
63+
- {{ include "operator.name" . }}-clusterrole
5564
# DaemonSet created per role group. Applied via SSA, tracked for orphan cleanup, and
5665
# owned by the controller.
5766
- apiGroups:
@@ -103,15 +112,6 @@ rules:
103112
- {{ include "operator.name" . }}clusters/status
104113
verbs:
105114
- patch
106-
# Required to bind the product ClusterRole to the per-cluster ServiceAccount.
107-
- apiGroups:
108-
- rbac.authorization.k8s.io
109-
resources:
110-
- clusterroles
111-
verbs:
112-
- bind
113-
resourceNames:
114-
- {{ include "operator.name" . }}-clusterrole
115115

116116
---
117117
apiVersion: rbac.authorization.k8s.io/v1

0 commit comments

Comments
 (0)