apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  labels:
    app.kubernetes.io/component: kubevirt
    app.kubernetes.io/managed-by: virt-operator
    kubevirt.io: ""
  name: kubevirt-controller
rules:
  - apiGroups:
      - ""
    resources:
      - namespaces
    verbs:
      - get
      - list
      - watch
      - patch
  - apiGroups:
      - policy
    resources:
      - poddisruptionbudgets
    verbs:
      - get
      - list
      - watch
      - delete
      - create
      - patch
  - apiGroups:
      - ""
    resources:
      - pods
      - configmaps
      - endpoints
      - services
    verbs:
      - get
      - list
      - watch
      - delete
      - update
      - create
      - patch
  - apiGroups:
      - ""
    resources:
      - events
    verbs:
      - update
      - create
      - patch
  - apiGroups:
      - ""
    resources:
      - secrets
    verbs:
      - create
  - apiGroups:
      - ""
    resources:
      - pods/finalizers
    verbs:
      - update
  - apiGroups:
      - ""
    resources:
      - pods/eviction
    verbs:
      - create
  - apiGroups:
      - ""
    resources:
      - pods/status
    verbs:
      - patch
  - apiGroups:
      - ""
    resources:
      - nodes
    verbs:
      - get
      - list
      - watch
      - update
      - patch
  - apiGroups:
      - apps
    resources:
      - daemonsets
    verbs:
      - list
  - apiGroups:
      - apps
    resources:
      - controllerrevisions
    verbs:
      - watch
      - list
      - create
      - delete
      - get
      - update
  - apiGroups:
      - ""
    resources:
      - persistentvolumeclaims
    verbs:
      - get
      - list
      - watch
      - create
      - update
      - delete
      - patch
  - apiGroups:
      - snapshot.kubevirt.io
    resources:
      - '*'
    verbs:
      - '*'
  - apiGroups:
      - export.kubevirt.io
    resources:
      - '*'
    verbs:
      - '*'
  - apiGroups:
      - pool.kubevirt.io
    resources:
      - virtualmachinepools
      - virtualmachinepools/finalizers
      - virtualmachinepools/status
      - virtualmachinepools/scale
    verbs:
      - watch
      - list
      - create
      - delete
      - update
      - patch
      - get
  - apiGroups:
      - kubevirt.io
    resources:
      - '*'
    verbs:
      - '*'
  - apiGroups:
      - subresources.kubevirt.io
    resources:
      - virtualmachineinstances/addvolume
      - virtualmachineinstances/removevolume
      - virtualmachineinstances/freeze
      - virtualmachineinstances/unfreeze
      - virtualmachineinstances/softreboot
    verbs:
      - update
  - apiGroups:
      - cdi.kubevirt.io
    resources:
      - '*'
    verbs:
      - '*'
  - apiGroups:
      - k8s.cni.cncf.io
    resources:
      - network-attachment-definitions
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - apiextensions.k8s.io
    resources:
      - customresourcedefinitions
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - authorization.k8s.io
    resources:
      - subjectaccessreviews
    verbs:
      - create
  - apiGroups:
      - snapshot.storage.k8s.io
    resources:
      - volumesnapshotclasses
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - snapshot.storage.k8s.io
    resources:
      - volumesnapshots
    verbs:
      - get
      - list
      - watch
      - create
      - update
      - delete
  - apiGroups:
      - storage.k8s.io
    resources:
      - storageclasses
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - instancetype.kubevirt.io
    resources:
      - virtualmachineinstancetypes
      - virtualmachineclusterinstancetypes
      - virtualmachinepreferences
      - virtualmachineclusterpreferences
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - migrations.kubevirt.io
    resources:
      - migrationpolicies
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - clone.kubevirt.io
    resources:
      - virtualmachineclones
      - virtualmachineclones/status
      - virtualmachineclones/finalizers
    verbs:
      - get
      - list
      - watch
      - update
      - patch
      - delete
  - apiGroups:
      - ""
    resources:
      - namespaces
    verbs:
      - get
  - apiGroups:
      - ""
    resources:
      - resourcequotas
    verbs:
      - list
      - watch