Skip to content

Commit

Permalink
Merge pull request #10173 from rmohr/leases
Browse files Browse the repository at this point in the history
Move coordination/lease RBAC permissions to Roles
  • Loading branch information
kubevirt-bot committed Aug 1, 2023
2 parents 2041062 + fc82817 commit feba51e
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 70 deletions.
48 changes: 24 additions & 24 deletions manifests/generated/operator-csv.yaml.in
Expand Up @@ -185,18 +185,6 @@ spec:
- update
- delete
- patch
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- delete
- update
- create
- patch
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -535,18 +523,6 @@ spec:
- update
- create
- patch
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- delete
- update
- create
- patch
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -787,6 +763,18 @@ spec:
- list
- get
- watch
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- delete
- update
- create
- patch
- apiGroups:
- kubevirt.io
resources:
Expand Down Expand Up @@ -1440,6 +1428,18 @@ spec:
- routes/custom-host
verbs:
- create
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- delete
- update
- create
- patch
serviceAccountName: kubevirt-operator
strategy: deployment
installModes:
Expand Down
48 changes: 24 additions & 24 deletions manifests/generated/rbac-operator.authorization.k8s.yaml.in
Expand Up @@ -63,6 +63,18 @@ rules:
- routes/custom-host
verbs:
- create
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- delete
- update
- create
- patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down Expand Up @@ -113,18 +125,6 @@ rules:
- update
- delete
- patch
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- delete
- update
- create
- patch
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -463,18 +463,6 @@ rules:
- update
- create
- patch
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- delete
- update
- create
- patch
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -715,6 +703,18 @@ rules:
- list
- get
- watch
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- delete
- update
- create
- patch
- apiGroups:
- kubevirt.io
resources:
Expand Down
22 changes: 11 additions & 11 deletions pkg/virt-operator/resource/generate/rbac/controller.go
Expand Up @@ -113,6 +113,17 @@ func newControllerRole(namespace string) *rbacv1.Role {
"watch",
},
},
{
APIGroups: []string{
"coordination.k8s.io",
},
Resources: []string{
"leases",
},
Verbs: []string{
"get", "list", "watch", "delete", "update", "create", "patch",
},
},
},
}
}
Expand Down Expand Up @@ -194,17 +205,6 @@ func newControllerClusterRole() *rbacv1.ClusterRole {
"get", "list", "watch", "delete", "update", "create", "patch",
},
},
{
APIGroups: []string{
"coordination.k8s.io",
},
Resources: []string{
"leases",
},
Verbs: []string{
"get", "list", "watch", "delete", "update", "create", "patch",
},
},
{
APIGroups: []string{
"",
Expand Down
22 changes: 11 additions & 11 deletions pkg/virt-operator/resource/generate/rbac/operator.go
Expand Up @@ -119,17 +119,6 @@ func NewOperatorClusterRole() *rbacv1.ClusterRole {
"patch",
},
},
{
APIGroups: []string{
"coordination.k8s.io",
},
Resources: []string{
"leases",
},
Verbs: []string{
"get", "list", "watch", "delete", "update", "create", "patch",
},
},
{
APIGroups: []string{
"",
Expand Down Expand Up @@ -540,6 +529,17 @@ func NewOperatorRole(namespace string) *rbacv1.Role {
"create",
},
},
{
APIGroups: []string{
"coordination.k8s.io",
},
Resources: []string{
"leases",
},
Verbs: []string{
"get", "list", "watch", "delete", "update", "create", "patch",
},
},
},
}
}
Expand Down

0 comments on commit feba51e

Please sign in to comment.