Skip to content

Commit

Permalink
Allow controller access to serviceaccounts
Browse files Browse the repository at this point in the history
  • Loading branch information
bastjan committed Nov 2, 2023
1 parent 14de45e commit bc634ef
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 @@ -15,6 +15,18 @@ rules:
- patch
- update
- watch
- apiGroups:
- ""
resources:
- serviceaccounts
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- cluster.appuio.io
resources:
Expand Down
2 changes: 2 additions & 0 deletions controllers/emergencyaccount_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ type EmergencyAccountReconciler struct {
//+kubebuilder:rbac:groups=cluster.appuio.io,resources=emergencyaccounts/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=cluster.appuio.io,resources=emergencyaccounts/finalizers,verbs=update

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

// Reconcile reconciles the EmergencyAccount resource.
// It creates a service account with the same name and namespace as the EmergencyAccount and requests a token for it.
// The token is then stored in the configured stores.
Expand Down

0 comments on commit bc634ef

Please sign in to comment.