Skip to content

Commit

Permalink
Merge pull request #339 from stuggi/OSPRH-8363
Browse files Browse the repository at this point in the history
Adding patch rbac perm for serviceaccounts
  • Loading branch information
openshift-merge-bot[bot] authored Jul 4, 2024
2 parents c761682 + 5f67f42 commit 63a9fd2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ rules:
- create
- get
- list
- patch
- update
- watch
- apiGroups:
Expand Down Expand Up @@ -92,6 +93,7 @@ rules:
resources:
- horizons/finalizers
verbs:
- patch
- update
- apiGroups:
- horizon.openstack.org
Expand Down Expand Up @@ -133,6 +135,7 @@ rules:
- create
- get
- list
- patch
- update
- watch
- apiGroups:
Expand All @@ -143,6 +146,7 @@ rules:
- create
- get
- list
- patch
- update
- watch
- apiGroups:
Expand Down
8 changes: 4 additions & 4 deletions controllers/horizon_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ type HorizonReconciler struct {

//+kubebuilder:rbac:groups=horizon.openstack.org,resources=horizons,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=horizon.openstack.org,resources=horizons/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=horizon.openstack.org,resources=horizons/finalizers,verbs=update
//+kubebuilder:rbac:groups=horizon.openstack.org,resources=horizons/finalizers,verbs=update;patch
//+kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch;create;update;patch;delete;
//+kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete;
//+kubebuilder:rbac:groups=core,resources=secrets,verbs=get;list;watch;create;update;patch;delete;
Expand All @@ -100,9 +100,9 @@ type HorizonReconciler struct {
//+kubebuilder:rbac:groups=memcached.openstack.org,resources=memcacheds,verbs=get;list;watch;

// service account, role, rolebinding
// +kubebuilder:rbac:groups="",resources=serviceaccounts,verbs=get;list;watch;create;update
// +kubebuilder:rbac:groups="rbac.authorization.k8s.io",resources=roles,verbs=get;list;watch;create;update
// +kubebuilder:rbac:groups="rbac.authorization.k8s.io",resources=rolebindings,verbs=get;list;watch;create;update
// +kubebuilder:rbac:groups="",resources=serviceaccounts,verbs=get;list;watch;create;update;patch
// +kubebuilder:rbac:groups="rbac.authorization.k8s.io",resources=roles,verbs=get;list;watch;create;update;patch
// +kubebuilder:rbac:groups="rbac.authorization.k8s.io",resources=rolebindings,verbs=get;list;watch;create;update;patch
// service account permissions that are needed to grant permission to the above
// +kubebuilder:rbac:groups="security.openshift.io",resourceNames=anyuid,resources=securitycontextconstraints,verbs=use
// +kubebuilder:rbac:groups="",resources=pods,verbs=create;delete;get;list;patch;update;watch
Expand Down

0 comments on commit 63a9fd2

Please sign in to comment.