Skip to content

Commit

Permalink
Merge pull request #159 from appuio/fix/service-account-permissions
Browse files Browse the repository at this point in the history
Fix service account kubebuilder annotations
  • Loading branch information
HappyTetrahedron authored Apr 25, 2023
2 parents 0221cdb + 4846336 commit 37403e6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
27 changes: 12 additions & 15 deletions config/rbac/controller/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,17 @@ rules:
verbs:
- get
- list
- patch
- update
- watch
- apiGroups:
- billing.appuio.io
resources:
- billingentities/status
verbs:
- get
- patch
- update
- apiGroups:
- organization.appuio.io
resources:
Expand Down Expand Up @@ -114,6 +124,8 @@ rules:
verbs:
- get
- list
- patch
- update
- watch
- apiGroups:
- rbac.appuio.io
Expand Down Expand Up @@ -197,21 +209,6 @@ rules:
- patch
- update
- watch
- apiGroups:
- user.appuio.io
resources:
- billingentities
verbs:
- get
- list
- apiGroups:
- user.appuio.io
resources:
- billingentities/status
verbs:
- get
- patch
- update
- apiGroups:
- user.appuio.io
resources:
Expand Down
6 changes: 3 additions & 3 deletions controllers/billingentity_email_cronjob.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ func (r *BillingEntityEmailCronJob) GetMetrics() prometheus.Collector {
return reg
}

//+kubebuilder:rbac:groups="rbac.appuio.io",resources=billingentities,verbs=get;list
//+kubebuilder:rbac:groups="user.appuio.io",resources=billingentities,verbs=get;list
//+kubebuilder:rbac:groups="rbac.appuio.io",resources=billingentities,verbs=get;list;update;patch
//+kubebuilder:rbac:groups="billing.appuio.io",resources=billingentities,verbs=get;list;update;patch
//+kubebuilder:rbac:groups="rbac.appuio.io",resources=billingentities/status,verbs=get;update;patch
//+kubebuilder:rbac:groups="user.appuio.io",resources=billingentities/status,verbs=get;update;patch
//+kubebuilder:rbac:groups="billing.appuio.io",resources=billingentities/status,verbs=get;update;patch

// Run lists all BillingEntity resources and sends notification emails if needed.
func (r *BillingEntityEmailCronJob) Run(ctx context.Context) error {
Expand Down

0 comments on commit 37403e6

Please sign in to comment.