Skip to content

Commit 808a382

Browse files
authored
Merge pull request #4 from fabiante/feat/reduce-rbac-permissions
Remove finalizer rbac permissions
2 parents 0ecac8a + e0ab9a5 commit 808a382

File tree

3 files changed

+0
-11
lines changed

3 files changed

+0
-11
lines changed

config/rbac/role.yaml

-7
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@ rules:
1212
- get
1313
- list
1414
- watch
15-
- apiGroups:
16-
- ""
17-
resources:
18-
- configmaps/finalizers
19-
- pods/finalizers
20-
verbs:
21-
- update
2215
- apiGroups:
2316
- ""
2417
resources:

internal/controller/configmap_controller.go

-2
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,8 @@ const (
4848
configMapObjectName = "podbouncer-config" // TODO: Make configurable
4949
)
5050

51-
// TODO: Check if the permissions below are too broad. Maybe there are permissions this controller does not actually need.
5251
// +kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch
5352
// +kubebuilder:rbac:groups=core,resources=configmaps/status,verbs=get
54-
// +kubebuilder:rbac:groups=core,resources=configmaps/finalizers,verbs=update
5553

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

internal/controller/pod_controller.go

-2
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,8 @@ type PodReconciler struct {
4141

4242
const excludedNamespace = "kube-system"
4343

44-
// TODO: Check if the permissions below are too broad. Maybe there are permissions this controller does not actually need.
4544
// +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch;create;update;patch;delete
4645
// +kubebuilder:rbac:groups=core,resources=pods/status,verbs=get;update;patch
47-
// +kubebuilder:rbac:groups=core,resources=pods/finalizers,verbs=update
4846

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

0 commit comments

Comments
 (0)