Skip to content

Commit 8a467ba

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 45a88ce commit 8a467ba

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

config/rbac/role.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,3 +151,9 @@ rules:
151151
- services
152152
verbs:
153153
- '*'
154+
- apiGroups:
155+
- networking.k8s.io
156+
resources:
157+
- networkpolicies
158+
verbs:
159+
- '*'

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=*,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)