Skip to content

Commit

Permalink
[controller] Giving permissions to controller over ConfigMaps
Browse files Browse the repository at this point in the history
  • Loading branch information
didierofrivia committed Jun 28, 2022
1 parent 8300379 commit b4362dc
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bundle/manifests/limitador-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,17 @@ spec:
spec:
clusterPermissions:
- rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- create
- delete
- get
- list
- update
- watch
- apiGroups:
- apps
resources:
Expand Down
11 changes: 11 additions & 0 deletions config/deploy/manfiests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,17 @@ metadata:
creationTimestamp: null
name: limitador-operator-manager-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- create
- delete
- get
- list
- update
- watch
- apiGroups:
- apps
resources:
Expand Down
11 changes: 11 additions & 0 deletions config/install/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,17 @@ metadata:
creationTimestamp: null
name: limitador-operatormanager-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- create
- delete
- get
- list
- update
- watch
- apiGroups:
- apps
resources:
Expand Down
11 changes: 11 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ metadata:
creationTimestamp: null
name: manager-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- create
- delete
- get
- list
- update
- watch
- apiGroups:
- apps
resources:
Expand Down
1 change: 1 addition & 0 deletions controllers/limitador_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ type LimitadorReconciler struct {
//+kubebuilder:rbac:groups=limitador.kuadrant.io,resources=limitadors/finalizers,verbs=update
//+kubebuilder:rbac:groups=core,resources=services,verbs=get;list;watch;create;update;delete
//+kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;delete
//+kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list;watch;create;update;delete

func (r *LimitadorReconciler) Reconcile(eventCtx context.Context, req ctrl.Request) (ctrl.Result, error) {
logger := r.Logger().WithValues("limitador", req.NamespacedName)
Expand Down

0 comments on commit b4362dc

Please sign in to comment.