Skip to content

Commit

Permalink
fix: the operator cluster role permission is missing (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
LinuxSuRen authored Sep 2, 2023
1 parent 2bbb634 commit 3f2877e
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
60 changes: 60 additions & 0 deletions operator/config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,66 @@ metadata:
creationTimestamp: null
name: manager-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- secrets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- services
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps
resources:
- deployments
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- core.linuxsuren.github.com
resources:
Expand Down
6 changes: 6 additions & 0 deletions operator/controllers/atest_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ type ATestReconciler struct {
//+kubebuilder:rbac:groups=core.linuxsuren.github.com,resources=atests/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=core.linuxsuren.github.com,resources=atests/finalizers,verbs=update

//+kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups="",resources=persistentvolumeclaims,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.
// TODO(user): Modify the Reconcile function to compare the state specified by
Expand Down

0 comments on commit 3f2877e

Please sign in to comment.