Skip to content

Commit

Permalink
Add rbac for deploying hostedclusters and nodepools
Browse files Browse the repository at this point in the history
Signed-off-by: Sharat Akhoury <[email protected]>
  • Loading branch information
sakhoury committed Jun 21, 2024
1 parent 469e2f0 commit af949f9
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
20 changes: 20 additions & 0 deletions bundle/manifests/siteconfig.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,26 @@ spec:
- get
- list
- watch
- apiGroups:
- hypershift.openshift.io
resources:
- hostedclusters
verbs:
- create
- delete
- get
- patch
- update
- apiGroups:
- hypershift.openshift.io
resources:
- nodepools
verbs:
- create
- delete
- get
- patch
- update
- apiGroups:
- metaclusterinstall.openshift.io
resources:
Expand Down
20 changes: 20 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,26 @@ rules:
- get
- list
- watch
- apiGroups:
- hypershift.openshift.io
resources:
- hostedclusters
verbs:
- create
- delete
- get
- patch
- update
- apiGroups:
- hypershift.openshift.io
resources:
- nodepools
verbs:
- create
- delete
- get
- patch
- update
- apiGroups:
- metaclusterinstall.openshift.io
resources:
Expand Down
2 changes: 2 additions & 0 deletions internal/controller/siteconfig_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ func requeueWithCustomInterval(interval time.Duration) ctrl.Result {
//+kubebuilder:rbac:groups=metal3.io,resources=baremetalhosts,verbs=get;create;update;patch
//+kubebuilder:rbac:groups=agent.open-cluster-management.io,resources=klusterletaddonconfigs,verbs=get;create;update;patch
//+kubebuilder:rbac:groups=metal3.io,resources=hostfirmwaresettings,verbs=get;create;update;patch
//+kubebuilder:rbac:groups=hypershift.openshift.io,resources=hostedclusters,verbs=get;create;update;patch;delete
//+kubebuilder:rbac:groups=hypershift.openshift.io,resources=nodepools,verbs=get;create;update;patch;delete

// 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 af949f9

Please sign in to comment.