Skip to content

Commit 97a685a

Browse files
committed
add roles for creating nwp
Signed-off-by: Kevin <[email protected]>
1 parent 0404e99 commit 97a685a

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
@@ -79,6 +79,8 @@ rules:
7979
- dscinitializations
8080
verbs:
8181
- get
82+
- list
83+
- watch
8284
- apiGroups:
8385
- networking.k8s.io
8486
resources:
@@ -89,6 +91,16 @@ rules:
8991
- get
9092
- patch
9193
- update
94+
- apiGroups:
95+
- networking.k8s.io
96+
resources:
97+
- networkpolicies
98+
verbs:
99+
- create
100+
- delete
101+
- get
102+
- patch
103+
- update
92104
- apiGroups:
93105
- ray.io
94106
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)