Skip to content

Commit

Permalink
Add pod read rbac
Browse files Browse the repository at this point in the history
Signed-off-by: kouki <[email protected]>
  • Loading branch information
kmdkuk committed Dec 10, 2023
1 parent 58241b7 commit 01f29f0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ rules:
- patch
- update
- watch
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
Expand Down
2 changes: 2 additions & 0 deletions internal/controller/minecraft_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ func NewMinecraftReconciler(client client.Client, log logr.Logger, scheme *runti
//+kubebuilder:rbac:groups=mcing.kmdkuk.com,resources=minecrafts/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=mcing.kmdkuk.com,resources=minecrafts/finalizers,verbs=update
//+kubebuilder:rbac:groups=apps,resources=statefulsets,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch
//+kubebuilder:rbac:groups=core,resources=services,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch;create;update;patch;delete

Expand Down Expand Up @@ -112,6 +113,7 @@ func (r *MinecraftReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
}

r.minecraftManager.Update(client.ObjectKeyFromObject(mc))
log.Info("finish reconcilation")
return ctrl.Result{}, nil
}

Expand Down

0 comments on commit 01f29f0

Please sign in to comment.