Commit 252b867
committed
Remove unnecessary pods RBAC permissions
The workload rbacRules and the matching kubebuilder RBAC marker in
the controller granted the workload service account full
CRUD (create/delete/get/list/patch/update/watch) on core Pods, but
that service account never reads or writes Pod objects directly.
Remove the unused grants.
The kubebuilder RBAC marker for pods (get;list) is kept: lib-common's
VerifyNetworkStatusFromAnnotation, called from this controller to
verify NetworkAttachments, lists Pods using the controller-manager's
own client, so the manager's ClusterRole (config/rbac/role.yaml) still
needs get;list on pods. Regenerate config/rbac/role.yaml.
Includes ef1e3b5
Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
(cherry picked from commit 2adbb94)1 parent 0315d93 commit 252b867
2 files changed
Lines changed: 8 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| |||
549 | 549 | | |
550 | 550 | | |
551 | 551 | | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | 552 | | |
558 | 553 | | |
559 | 554 | | |
| |||
0 commit comments