apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: assisted-installer-controller
  namespace: assisted-installer
rules:
  # "" indicates the core API group
  - apiGroups:
      - ""
    resources:
      - nodes
      - pods
      - configmaps
      - pods/log
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - certificates.k8s.io
    resources:
      - certificatesigningrequests
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - certificates.k8s.io
    resources:
      - certificatesigningrequests/approval
    verbs:
      - update
  - apiGroups:
      - authentication.k8s.io
    resources:
      - tokenreviews
    verbs:
      - create
  - apiGroups:
      - authorization.k8s.io
    resources:
      - subjectaccessreviews
    verbs:
      - create
  - apiGroups:
      - config.openshift.io
    resources:
      - clusteroperators
    verbs:
      - get
      - create
      - list
      - watch
  - apiGroups:
      - config.openshift.io
    resources:
      - clusteroperators/status
    resourceNames:
      - machine-approver
    verbs:
      - update
  - apiGroups:
      - config.openshift.io
    resources:
      - proxies
    verbs:
      - get
      - list
  - apiGroups:
      - certificates.k8s.io
    resourceNames:
      - kubernetes.io/kube-apiserver-client-kubelet
      - kubernetes.io/kubelet-serving
    resources:
      - signers
    verbs:
      - approve
  - apiGroups:
      - operator.openshift.io
    resources:
      - etcds
    verbs:
      - patch
  - apiGroups:
      - metal3.io
    resources:
      - baremetalhosts
    verbs:
      - get
      - list
      - watch
      - update
      - patch
  - apiGroups:
      - metal3.io
    resources:
      - baremetalhosts/status
    verbs:
      - get
      - patch
      - update
  - apiGroups:
      - metal3.io
    resources:
      - provisionings
    verbs:
      - get
      - list
  - apiGroups:
      - config.openshift.io
    resources:
      - clusterversions
    verbs:
      - get
      - list
