apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  labels:
    app.kubernetes.io/component: kubevirt
    app.kubernetes.io/managed-by: virt-operator
    kubevirt.io: ""
    rbac.authorization.k8s.io/aggregate-to-edit: "true"
  name: kubevirt.io:edit
rules:
  - apiGroups:
      - subresources.kubevirt.io
    resources:
      - virtualmachineinstances/console
      - virtualmachineinstances/vnc
      - virtualmachineinstances/vnc/screenshot
      - virtualmachineinstances/portforward
      - virtualmachineinstances/guestosinfo
      - virtualmachineinstances/filesystemlist
      - virtualmachineinstances/userlist
    verbs:
      - get
  - apiGroups:
      - subresources.kubevirt.io
    resources:
      - virtualmachineinstances/pause
      - virtualmachineinstances/unpause
      - virtualmachineinstances/addvolume
      - virtualmachineinstances/removevolume
      - virtualmachineinstances/freeze
      - virtualmachineinstances/unfreeze
      - virtualmachineinstances/softreboot
    verbs:
      - update
  - apiGroups:
      - subresources.kubevirt.io
    resources:
      - virtualmachines/expand-spec
      - virtualmachines/portforward
    verbs:
      - get
  - apiGroups:
      - subresources.kubevirt.io
    resources:
      - virtualmachines/start
      - virtualmachines/stop
      - virtualmachines/restart
      - virtualmachines/addvolume
      - virtualmachines/removevolume
      - virtualmachines/migrate
      - virtualmachines/memorydump
      - virtualmachines/addinterface
    verbs:
      - update
  - apiGroups:
      - subresources.kubevirt.io
    resources:
      - expand-vm-spec
    verbs:
      - update
  - apiGroups:
      - kubevirt.io
    resources:
      - virtualmachines
      - virtualmachineinstances
      - virtualmachineinstancepresets
      - virtualmachineinstancereplicasets
      - virtualmachineinstancemigrations
    verbs:
      - get
      - delete
      - create
      - update
      - patch
      - list
      - watch
  - apiGroups:
      - snapshot.kubevirt.io
    resources:
      - virtualmachinesnapshots
      - virtualmachinesnapshotcontents
      - virtualmachinerestores
    verbs:
      - get
      - delete
      - create
      - update
      - patch
      - list
      - watch
  - apiGroups:
      - export.kubevirt.io
    resources:
      - virtualmachineexports
    verbs:
      - get
      - delete
      - create
      - update
      - patch
      - list
      - watch
  - apiGroups:
      - clone.kubevirt.io
    resources:
      - virtualmachineclones
    verbs:
      - get
      - delete
      - create
      - update
      - patch
      - list
      - watch
  - apiGroups:
      - instancetype.kubevirt.io
    resources:
      - virtualmachineinstancetypes
      - virtualmachineclusterinstancetypes
      - virtualmachinepreferences
      - virtualmachineclusterpreferences
    verbs:
      - get
      - delete
      - create
      - update
      - patch
      - list
      - watch
  - apiGroups:
      - pool.kubevirt.io
    resources:
      - virtualmachinepools
    verbs:
      - get
      - delete
      - create
      - update
      - patch
      - list
      - watch
  - apiGroups:
      - kubevirt.io
    resources:
      - kubevirts
    verbs:
      - get
      - list
  - apiGroups:
      - migrations.kubevirt.io
    resources:
      - migrationpolicies
    verbs:
      - get
      - list
      - watch