# This role is used to check coredns endpoints of a cluster from the outside.
# The intention is to monitor a cluster from the outside in case DNS is broken
# and ZMON inside the cluster would not work.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: zmon-external-check
rules:
- apiGroups:
  - ""
  resources:
  - endpoints
  resourceNames:
  - coredns
  verbs:
  - get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: zmon-external-check
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: zmon-external-check
subjects:
- apiGroup: rbac.authorization.k8s.io
  kind: User
  name: zalando-iam:zalando:service:stups_gerry

Enable gerry (zmon user) to monitor coredns endpoints from the outside
Enable gerry (zmon user) to monitor coredns endpoints from the outside

Signed-off-by: Mikkel Oscar Lyderik Larsen <81479e3d2d1e6902cb05f938ea9a734a092b1af3@zalando.de>
