Skip to content

Commit 515db6d

Browse files
committed
review: don't use * for rbac in notebooks-controller
1 parent a24da99 commit 515db6d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

components/notebook-controller/config/rbac/role.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ rules:
3939
resources:
4040
- httproutes
4141
verbs:
42-
- '*'
42+
- create
43+
- get
44+
- list
45+
- update
46+
- watch
4347
- apiGroups:
4448
- kubeflow.org
4549
resources:

components/notebook-controller/controllers/notebook_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ type NotebookReconciler struct {
8888
// +kubebuilder:rbac:groups=apps,resources=statefulsets,verbs="*"
8989
// +kubebuilder:rbac:groups=kubeflow.org,resources=notebooks;notebooks/status;notebooks/finalizers,verbs="*"
9090
// +kubebuilder:rbac:groups="networking.istio.io",resources=virtualservices,verbs="*"
91-
// +kubebuilder:rbac:groups="gateway.networking.k8s.io",resources=httproutes,verbs="*"
91+
// +kubebuilder:rbac:groups=gateway.networking.k8s.io,resources=httproutes,verbs=get;list;watch;create;update
9292

9393
func (r *NotebookReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
9494
log := r.Log.WithValues("notebook", req.NamespacedName)

0 commit comments

Comments
 (0)