Skip to content

Commit

Permalink
build, controller: remove list and watch verbs from RBAC
Browse files Browse the repository at this point in the history
The virt-controller component only requires the `GET` RBAC permissions,
thus, all others can be dropped.

Signed-off-by: Miguel Duarte Barroso <[email protected]>
  • Loading branch information
maiqueb committed Sep 27, 2023
1 parent a22d2c1 commit cafc17e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
2 changes: 0 additions & 2 deletions manifests/generated/operator-csv.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -635,8 +635,6 @@ spec:
- network-attachment-definitions
verbs:
- get
- list
- watch
- apiGroups:
- apiextensions.k8s.io
resources:
Expand Down
2 changes: 0 additions & 2 deletions manifests/generated/rbac-operator.authorization.k8s.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,6 @@ rules:
- network-attachment-definitions
verbs:
- get
- list
- watch
- apiGroups:
- apiextensions.k8s.io
resources:
Expand Down
4 changes: 1 addition & 3 deletions pkg/virt-operator/resource/generate/rbac/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,7 @@ func newControllerClusterRole() *rbacv1.ClusterRole {
Resources: []string{
"network-attachment-definitions",
},
Verbs: []string{
"get", "list", "watch",
},
Verbs: []string{"get"},
},
{
APIGroups: []string{
Expand Down

0 comments on commit cafc17e

Please sign in to comment.