Skip to content

Commit

Permalink
Update RBAC rules for the bootstrap provider (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
neoaggelos authored Sep 21, 2022
1 parent bfdb957 commit d4e3f82
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
30 changes: 30 additions & 0 deletions bootstrap-components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,19 @@ metadata:
creationTimestamp: null
name: capi-microk8s-bootstrap-manager-role
rules:
- apiGroups:
- ""
resources:
- configmaps
- secrets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- bootstrap.cluster.x-k8s.io
resources:
Expand All @@ -951,6 +964,23 @@ rules:
- get
- patch
- update
- apiGroups:
- cluster.x-k8s.io
resources:
- clusters
- clusters/finalizers
- clusters/status
- machines
- machines/finalizers
- machines/status
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
30 changes: 30 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ metadata:
creationTimestamp: null
name: manager-role
rules:
- apiGroups:
- ""
resources:
- configmaps
- secrets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- bootstrap.cluster.x-k8s.io
resources:
Expand All @@ -31,3 +44,20 @@ rules:
- get
- patch
- update
- apiGroups:
- cluster.x-k8s.io
resources:
- clusters
- clusters/finalizers
- clusters/status
- machines
- machines/finalizers
- machines/status
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
2 changes: 2 additions & 0 deletions controllers/microk8sconfig_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ const (
//+kubebuilder:rbac:groups=bootstrap.cluster.x-k8s.io,resources=microk8sconfigs,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=bootstrap.cluster.x-k8s.io,resources=microk8sconfigs/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=bootstrap.cluster.x-k8s.io,resources=microk8sconfigs/finalizers,verbs=update
//+kubebuilder:rbac:groups=cluster.x-k8s.io,resources=clusters;clusters/finalizers;clusters/status;machines;machines/finalizers;machines/status,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups="",resources=configmaps;secrets,verbs=get;list;watch;create;update;patch;delete

// Reconcile is part of the main kubernetes reconciliation loop which aims to
// move the current state of the cluster closer to the desired state.
Expand Down

0 comments on commit d4e3f82

Please sign in to comment.