Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
Enable manager role to modify operator finalizers
Browse files Browse the repository at this point in the history
This permission was missing and was causing issues when deploying the
Gatekeeper resource as the manager couldn't set the onwer references
to other objects.

Closes #88
  • Loading branch information
JAORMX committed Dec 18, 2020
1 parent 5d0c60c commit 03cb149
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions config/rbac/base/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ rules:
- patch
- update
- watch
- apiGroups:
- operator.gatekeeper.sh
resources:
- gatekeepers/finalizers
verbs:
- delete
- get
- patch
- update
- apiGroups:
- operator.gatekeeper.sh
resources:
Expand Down
1 change: 1 addition & 0 deletions controllers/gatekeeper_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ type GatekeeperReconciler struct {
// Gatekeeper Operator RBAC permissions to manager Gatekeeper custom resource
// +kubebuilder:rbac:groups=operator.gatekeeper.sh,resources=gatekeepers,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=operator.gatekeeper.sh,resources=gatekeepers/status,verbs=get;update;patch
// +kubebuilder:rbac:groups=operator.gatekeeper.sh,resources=gatekeepers/finalizers,verbs=delete;get;update;patch

// Gatekeeper Operator RBAC permissions to deploy Gatekeeper. Many of these
// RBAC permissions are needed because the operator must have the permissions
Expand Down

0 comments on commit 03cb149

Please sign in to comment.