Skip to content

Commit

Permalink
Give API server permission to create RoleBindings for teams
Browse files Browse the repository at this point in the history
  • Loading branch information
glrf committed Mar 9, 2022
1 parent 5088057 commit 63c4067
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions apiserver/organization/rolebindings.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
// Needed so that we are allowed to delegate the default clusterroles
// +kubebuilder:rbac:groups="rbac.appuio.io",resources=organizations,verbs=get;list;watch;create;delete;patch;update;edit
// +kubebuilder:rbac:groups="organization.appuio.io",resources=organizations,verbs=get;list;watch;create;delete;patch;update;edit
// +kubebuilder:rbac:groups="appuio.io",resources=teams,verbs=get;list;watch;create;delete;patch;update

//go:generate go run github.com/golang/mock/mockgen -source=$GOFILE -destination=./mock/$GOFILE
type roleBindingCreator interface {
Expand Down
12 changes: 12 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ rules:
- patch
- update
- watch
- apiGroups:
- appuio.io
resources:
- teams
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- coordination.k8s.io
resources:
Expand Down
2 changes: 1 addition & 1 deletion config/user-rbac/organization-admin-role.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ rules:
verbs: ["get", "watch", "list", "patch", "update", "create"]
- apiGroups: ["appuio.io"]
resources: ["teams"]
verbs: ["get", "watch", "list", "patch", "update", "create"]
verbs: ["get", "watch", "list", "patch", "update", "create", "delete"]
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["rolebindings"]
verbs: ["get", "watch", "list", "patch", "update", "create"]

0 comments on commit 63c4067

Please sign in to comment.