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

Commit

Permalink
Merge pull request #6 from suskin/add-permissions
Browse files Browse the repository at this point in the history
permissions: add permissions for mysql and kubernetes resources
  • Loading branch information
suskin committed Sep 10, 2019
2 parents ef7bb4d + 28ef29b commit faa5a59
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
36 changes: 36 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,30 @@ metadata:
creationTimestamp: null
name: manager-role
rules:
- apiGroups:
- compute.crossplane.io
resources:
- kubernetesclusters
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- database.crossplane.io
resources:
- mysqlinstances
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- wordpress.samples.stacks.crossplane.io
resources:
Expand All @@ -26,3 +50,15 @@ rules:
- get
- patch
- update
- apiGroups:
- workload.crossplane.io
resources:
- kubernetesapplication
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
3 changes: 3 additions & 0 deletions controllers/wordpressinstance_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ type WordpressInstanceReconciler struct {

// +kubebuilder:rbac:groups=wordpress.samples.stacks.crossplane.io,resources=wordpressinstances,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=wordpress.samples.stacks.crossplane.io,resources=wordpressinstances/status,verbs=get;update;patch
// +kubebuilder:rbac:groups=compute.crossplane.io,resources=kubernetesclusters,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=database.crossplane.io,resources=mysqlinstances,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=workload.crossplane.io,resources=kubernetesapplication,verbs=get;list;watch;create;update;patch;delete

func (r *WordpressInstanceReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
ctx := context.Background()
Expand Down

0 comments on commit faa5a59

Please sign in to comment.