apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
  name: openshift-ingress-router
rules:
- apiGroups:
  - ""
  resources:
  - namespaces
  - services
  - endpoints
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - route.openshift.io
  resources:
  - routes
  verbs:
  - list
  - watch
- apiGroups:
  - route.openshift.io
  resources:
  - routes/status
  verbs:
  - get
  - patch
  - update
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: openshift-ingress-router
roleRef:
  apiGroup: ""
  kind: ClusterRole
  name: openshift-ingress-router
subjects:
- kind: ServiceAccount
  namespace: openshift-ingress
  name: ingress-router
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: openshift-ingress-router-auth-delegator
roleRef:
  apiGroup: ""
  kind: ClusterRole
  name: system:auth-delegator
subjects:
- kind: ServiceAccount
  namespace: openshift-ingress
  name: ingress-router

---
apiVersion: v1
kind: Namespace
metadata:
  name: openshift-ingress
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: ingress-router
  namespace: openshift-ingress
