# Cluster role for the operator itself.
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: openshift-ingress-operator
rules:
- apiGroups:
  - ""
  resources:
  - configmaps
  - namespaces
  - serviceaccounts
  - endpoints
  - services
  - secrets
  - pods
  verbs:
  - "*"

- apiGroups:
  - ""
  resources:
  - events
  verbs:
  - create

- apiGroups:
  - apps
  resources:
  - deployments
  verbs:
  - "*"

- apiGroups:
  - monitoring.coreos.com
  resources:
  - servicemonitors
  verbs:
  - create
  - get

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

- apiGroups:
  - operator.openshift.io
  resources:
  - ingresscontrollers
  verbs:
  - list
  - watch

- apiGroups:
  - operator.openshift.io
  resources:
  - ingresscontrollers/status
  verbs:
  - update

- apiGroups:
  - config.openshift.io
  resources:
  - infrastructures
  - ingresses
  - dnses
  verbs:
  - get

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

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

# Mirrored from assets/router/metrics/cluster-role.yaml
- apiGroups:
  - route.openshift.io
  resources:
  - routers/metrics
  verbs:
  - get

# Mirrored from assets/router/cluster-role.yaml
- apiGroups:
  - authentication.k8s.io
  resources:
  - tokenreviews
  verbs:
  - create

# Mirrored from assets/router/cluster-role.yaml
- apiGroups:
  - authorization.k8s.io
  resources:
  - subjectaccessreviews
  verbs:
  - create

# Mirrored from assets/router/cluster-role.yaml
- apiGroups:
  - route.openshift.io
  resources:
  - routes
  verbs:
  - list
  - watch

# Mirrored from assets/router/cluster-role.yaml
- apiGroups:
  - route.openshift.io
  resources:
  - routes/status
  verbs:
  - update

# Mirrored from assets/router/cluster-role.yaml
- apiGroups:
  - security.openshift.io
  resources:
  - securitycontextconstraints
  verbs:
  - use
  resourceNames:
  - hostnetwork
