# Cluster role for the operator itself.
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: openshift-dns-operator
rules:
- apiGroups:
  - dns.openshift.io
  resources:
  - clusterdnses
  verbs:
  - "*"

- apiGroups:
  - apps
  - extensions
  resources:
  - daemonsets
  verbs:
  - "*"

- apiGroups:
  - ""
  resources:
  - namespaces
  - services
  - serviceaccounts
  - configmaps
  verbs:
  - create
  - get
  - list
  - watch
  - delete

- apiGroups:
  - rbac.authorization.k8s.io
  resources:
  - clusterroles
  - clusterrolebindings
  verbs:
  - create
  - list
  - watch

- apiGroups:
  - config.openshift.io
  resources:
  - clusteroperators
  verbs:
  - create
  - get

- apiGroups:
  - config.openshift.io
  resources:
  - clusteroperators/status
  verbs:
  - update

# Mirrored from assets/dns/cluster-role.yaml
- apiGroups:
  - ""
  resources:
  - endpoints
  - services
  - pods
  - namespaces
  verbs:
  - list
  - watch
