Skip to content

Commit fc84c9c

Browse files
committed
add roles for creating nwp
Signed-off-by: Kevin <[email protected]>
1 parent a4c00e7 commit fc84c9c

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

config/rbac/role.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ rules:
5252
- dscinitializations
5353
verbs:
5454
- get
55+
- list
56+
- watch
5557
- apiGroups:
5658
- networking.k8s.io
5759
resources:
@@ -62,6 +64,16 @@ rules:
6264
- get
6365
- patch
6466
- update
67+
- apiGroups:
68+
- networking.k8s.io
69+
resources:
70+
- networkpolicies
71+
verbs:
72+
- create
73+
- delete
74+
- get
75+
- patch
76+
- update
6577
- apiGroups:
6678
- ray.io
6779
resources:

pkg/controllers/raycluster_controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ var (
8686
// +kubebuilder:rbac:groups=rbac.authorization.k8s.io,resources=clusterrolebindings,verbs=get;create;update;patch;delete
8787
// +kubebuilder:rbac:groups=authentication.k8s.io,resources=tokenreviews,verbs=create;
8888
// +kubebuilder:rbac:groups=authorization.k8s.io,resources=subjectaccessreviews,verbs=create;
89-
// +kubebuilder:rbac:groups=dscinitialization.opendatahub.io,resources=dscinitializations,verbs=get
89+
// +kubebuilder:rbac:groups=dscinitialization.opendatahub.io,resources=dscinitializations,verbs=get;list;watch
90+
// +kubebuilder:rbac:groups=networking.k8s.io,resources=networkpolicies,verbs=get;create;update;patch;delete
9091

9192
// Reconcile is part of the main kubernetes reconciliation loop which aims to
9293
// move the current state of the cluster closer to the desired state.

0 commit comments

Comments
 (0)