Skip to content

Commit

Permalink
rbac: add Get permission for config.openshift.io.infrastructures
Browse files Browse the repository at this point in the history
Consuming the lates updates from the deploy
allow us now to distinguish between OCP and HCP flavors.

But for that an access to the config.openshift.io.infrastructures object
is needed.
Adding the necessary rbac.

Signed-off-by: Talor Itzhak <[email protected]>
  • Loading branch information
Tal-or committed Sep 25, 2024
1 parent c1e5fa4 commit 0adba16
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ metadata:
}
]
capabilities: Basic Install
createdAt: "2024-09-17T08:34:36Z"
createdAt: "2024-09-25T14:08:22Z"
olm.skipRange: '>=4.17.0 <4.18.0'
operators.operatorframework.io/builder: operator-sdk-v1.36.1
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
Expand Down Expand Up @@ -377,6 +377,7 @@ spec:
- config.openshift.io
resources:
- clusteroperators
- infrastructures
verbs:
- get
- apiGroups:
Expand Down
1 change: 1 addition & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ rules:
- config.openshift.io
resources:
- clusteroperators
- infrastructures
verbs:
- get
- apiGroups:
Expand Down
1 change: 1 addition & 0 deletions controllers/numaresourcesoperator_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ type NUMAResourcesOperatorReconciler struct {
//+kubebuilder:rbac:groups=topology.node.k8s.io,resources=noderesourcetopologies,verbs=get;list;create;update
//+kubebuilder:rbac:groups=config.openshift.io,resources=clusterversions,verbs=list
//+kubebuilder:rbac:groups=config.openshift.io,resources=clusteroperators,verbs=get
//+kubebuilder:rbac:groups=config.openshift.io,resources=infrastructures,verbs=get
//+kubebuilder:rbac:groups=machineconfiguration.openshift.io,resources=machineconfigs,verbs=*
//+kubebuilder:rbac:groups=machineconfiguration.openshift.io,resources=machineconfigpools,verbs=get;list;watch
//+kubebuilder:rbac:groups=security.openshift.io,resources=securitycontextconstraints,verbs=*
Expand Down

0 comments on commit 0adba16

Please sign in to comment.