Skip to content

Commit 195c9ec

Browse files
add roles for admin and editor to operator
Signed-off-by: Kevin <[email protected]>
1 parent a40442c commit 195c9ec

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed

config/rbac/admin_role.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRole
3+
metadata:
4+
annotations:
5+
rbac.authorization.kubernetes.io/autoupdate: "true"
6+
name: clusterrole-admin
7+
labels:
8+
rbac.authorization.kubernetes.io/aggregate-to-admin: "true"
9+
rules:
10+
- apiGroups:
11+
- quota.codeflare.dev
12+
resources:
13+
- quotasubtrees
14+
verbs:
15+
- create
16+
- delete
17+
- deletecollection
18+
- get
19+
- list
20+
- patch
21+
- update
22+
- watch

config/rbac/editor_role.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRole
3+
metadata:
4+
annotations:
5+
rbac.authorization.kubernetes.io/autoupdate: "true"
6+
name: clusterrole-edit
7+
labels:
8+
rbac.authorization.k8s.io/aggregate-to-admin: "true"
9+
rbac.authorization.k8s.io/aggregate-to-edit: "true"
10+
rules:
11+
- apiGroups:
12+
- workload.codeflare.dev
13+
resources:
14+
- schedulingspecs
15+
- appwrappers
16+
verbs:
17+
- create
18+
- delete
19+
- deletecollection
20+
- get
21+
- list
22+
- patch
23+
- update
24+
- watch

config/rbac/kustomization.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ resources:
44
# if your manager will use a service account that exists at
55
# runtime. Be sure to update RoleBinding and ClusterRoleBinding
66
# subjects if changing service account names.
7+
- admin_role.yaml
8+
- editor_role.yaml
79
- service_account.yaml
810
- role.yaml
911
- role_binding.yaml

0 commit comments

Comments
 (0)