Skip to content

Commit 9a0ccd2

Browse files
authored
reduce RBAC permissions of operator-controller (#116)
operator-controller does not (and should not ever) need permission to create/update/patch/delete Operator objects. It needs: - write on Operator status - write on Operator finalizers - read on all other operator fields
1 parent 827b304 commit 9a0ccd2

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

config/rbac/role.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,8 @@ rules:
2121
resources:
2222
- operators
2323
verbs:
24-
- create
25-
- delete
2624
- get
2725
- list
28-
- patch
29-
- update
3026
- watch
3127
- apiGroups:
3228
- operators.operatorframework.io

controllers/operator_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func NewOperatorReconciler(c client.Client, s *runtime.Scheme, r *resolution.Ope
5151
}
5252
}
5353

54-
//+kubebuilder:rbac:groups=operators.operatorframework.io,resources=operators,verbs=get;list;watch;create;update;patch;delete
54+
//+kubebuilder:rbac:groups=operators.operatorframework.io,resources=operators,verbs=get;list;watch
5555
//+kubebuilder:rbac:groups=operators.operatorframework.io,resources=operators/status,verbs=get;update;patch
5656
//+kubebuilder:rbac:groups=operators.operatorframework.io,resources=operators/finalizers,verbs=update
5757

0 commit comments

Comments
 (0)