Skip to content

Commit

Permalink
add missing rbac access definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
therealak12 committed Aug 5, 2023
1 parent 9b61f76 commit 6afe1d7
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 1 deletion.
32 changes: 32 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,26 @@ metadata:
creationTimestamp: null
name: manager-role
rules:
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- resourcequotas
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
Expand All @@ -17,6 +37,18 @@ rules:
- patch
- update
- watch
- apiGroups:
- quota.openshift.io
resources:
- clusterresourcequotas
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- s3.snappcloud.io
resources:
Expand Down
2 changes: 1 addition & 1 deletion deploy/charts/s3-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
version: 0.2.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
Expand Down
32 changes: 32 additions & 0 deletions deploy/charts/s3-operator/templates/manager-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,26 @@ metadata:
labels:
{{- include "s3-operator.labels" . | nindent 4 }}
rules:
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- resourcequotas
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
Expand All @@ -17,6 +37,18 @@ rules:
- patch
- update
- watch
- apiGroups:
- quota.openshift.io
resources:
- clusterresourcequotas
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- s3.snappcloud.io
resources:
Expand Down
3 changes: 3 additions & 0 deletions internal/controllers/s3userclaim/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ func NewReconciler(mgr manager.Manager, cfg *config.Config, rgwClient *admin.API
//+kubebuilder:rbac:groups=s3.snappcloud.io,resources=s3users,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=s3.snappcloud.io,resources=s3users/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=s3.snappcloud.io,resources=s3users/finalizers,verbs=update
//+kubebuilder:rbac:groups=core,resources=namespaces,verbs=get;list;watch
//+kubebuilder:rbac:groups=core,resources=secrets,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=core,resources=resourcequotas,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=quota.openshift.io,resources=clusterresourcequotas,verbs=get;list;watch;create;update;patch;delete

func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
r.logger = log.FromContext(ctx)
Expand Down

0 comments on commit 6afe1d7

Please sign in to comment.