apiVersion: v1
kind: ConfigMap
metadata:
  name: coredns
  namespace: kube-system
data:
  Corefile: |
    .:53 {
        errors
        health
        rewrite name chat-0 chat-0.xmpp-internal-svc.default.svc.cluster.local
        rewrite name chat-1 chat-1.xmpp-internal-svc.default.svc.cluster.local
        rewrite name chat-2 chat-2.xmpp-internal-svc.default.svc.cluster.local
        kubernetes cluster.local in-addr.arpa ip6.arpa {
          pods insecure
          upstream
          fallthrough in-addr.arpa ip6.arpa
        }
        prometheus :9153
        proxy . /etc/resolv.conf
        cache 30
        loop
        reload
        loadbalance
    }
