---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: submariner-operator
rules:
  # submariner-operator updates the config map of core-dns to forward requests to
  # clusterset.local to Lighthouse DNS, also looks at existing configmaps
  # to figure out network settings
  - apiGroups:
      - ""
    resources:
      - configmaps
    verbs:
      - get
      - list
      - watch
      - update
  - apiGroups:
      - apiextensions.k8s.io
    resources:
      - customresourcedefinitions
    verbs:
      - get
      - list
      - create
      - update
      - delete
  - apiGroups:  # pods and services are looked up to figure out network settings
      - ""
    resources:
      - pods
      - services
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - operator.openshift.io
    resources:
      - dnses
    verbs:
      - get
      - list
      - watch
      - update
  - apiGroups:
      - config.openshift.io
    resources:
      - networks
    verbs:
      - get
      - list
