Skip to content

Commit

Permalink
Add rule to operator ClusterRole to manage Service resource
Browse files Browse the repository at this point in the history
As part of enabling metrics for RTE, a Service resource is created during the deployment of the RTE metrics manifests by the operator. This commit grants the operator pod the necessary permissions to deploy the Service CR.

Signed-off-by: Ronny Baturov <[email protected]>
  • Loading branch information
rbaturov committed Oct 6, 2024
1 parent 4751257 commit b97a69d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ rules:
- get
- list
- watch
- apiGroups:
- ""
resources:
- serviceaccounts
verbs:
- '*'
- apiGroups:
- ""
resources:
- services
verbs:
- '*'
- apiGroups:
- apiextensions.k8s.io
resources:
Expand Down
1 change: 1 addition & 0 deletions controllers/numaresourcesoperator_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ type NUMAResourcesOperatorReconciler struct {
//+kubebuilder:rbac:groups=nodetopology.openshift.io,resources=numaresourcesoperators,verbs=*
//+kubebuilder:rbac:groups=nodetopology.openshift.io,resources=numaresourcesoperators/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=nodetopology.openshift.io,resources=numaresourcesoperators/finalizers,verbs=update
//+kubebuilder:rbac:groups="",resources=services,verbs=*

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

0 comments on commit b97a69d

Please sign in to comment.