Skip to content

Commit

Permalink
feat: enhance rbac manifest for cronjobs
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Lauber <jan.lauber@protonmail.ch>
  • Loading branch information
janlauber committed May 22, 2024
1 parent 0acf2e1 commit 0b6d000
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@ rules:
- patch
- update
- watch
- apiGroups:
- batch
resources:
- cronjobs
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
Expand Down
2 changes: 2 additions & 0 deletions controllers/rollout_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ type RolloutReconciler struct {

//+kubebuilder:rbac:groups="",resources=pods,verbs=get;list;watch

//+kubebuilder:rbac:groups=batch,resources=cronjobs,verbs=get;list;watch;create;update;patch;delete

func (r *RolloutReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
log := log.FromContext(ctx)

Expand Down

0 comments on commit 0b6d000

Please sign in to comment.