Skip to content

Commit 476469f

Browse files
rbaturovTal-or
authored andcommitted
add rbac to operator to create networkpolicies
This is needed since the operator pod needs to create the networkpolicy for the metrics endpoint. Signed-off-by: Ronny Baturov <[email protected]>
1 parent 189104f commit 476469f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

config/rbac/role.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,3 +151,13 @@ rules:
151151
- services
152152
verbs:
153153
- '*'
154+
- apiGroups:
155+
- networking.k8s.io
156+
resources:
157+
- networkpolicies
158+
verbs:
159+
- create
160+
- delete
161+
- get
162+
- list
163+
- update

internal/controller/numaresourcesoperator_controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ type NUMAResourcesOperatorReconciler struct {
9797

9898
// Namespace Scoped
9999
//+kubebuilder:rbac:groups="",resources=services,verbs=*,namespace="numaresources"
100+
//+kubebuilder:rbac:groups=networking.k8s.io,resources=networkpolicies,verbs=get;list;create;update;delete,namespace="numaresources"
100101

101102
// Cluster Scoped
102103
//+kubebuilder:rbac:groups=topology.node.k8s.io,resources=noderesourcetopologies,verbs=get;list;create;update

0 commit comments

Comments
 (0)