apiVersion: v1
kind: ConfigMap
metadata:
  name: coredns
  namespace: kube-system
apiVersion: v1
data:
  Corefile: |
    .:53 {
        errors
        health {
           lameduck 5s
        }
        rewrite {
           name regex isamconfig iamlab-isamconfig.default.svc.cluster.local
           answer name iamlab-isamconfig.default.svc.cluster.local isamconfig
        }
        rewrite {
           name regex isamwrprp1 iamlab-isamwrp-rp1.default.svc.cluster.local
           answer name iamlab-isamwrp-rp1.default.svc.cluster.local isamwrprp1
        }
        rewrite {
           name regex postgresql iamlab-isampostgresql.default.svc.cluster.local
           answer name iamlab-isampostgresql.default.svc.cluster.local postgresql
        }
        rewrite {
           name regex isamruntime iamlab-isamruntime.default.svc.cluster.local
           answer name iamlab-isamruntime.default.svc.cluster.local isamruntime
        }
        rewrite {
           name regex isamdsc iamlab-isamdsc-primary.default.svc.cluster.local
           answer name iamlab-isamdsc-primary.default.svc.cluster.local isamdsc
        }
        rewrite {
           name regex openldap iamlab-isamopenldap.default.svc.cluster.local
           answer name iamlab-isamopenldap.default.svc.cluster.local openldap
        }
        ready
        kubernetes cluster.local in-addr.arpa ip6.arpa {
           pods insecure
           fallthrough in-addr.arpa ip6.arpa
           ttl 30
        }
        prometheus :9153
        forward . /etc/resolv.conf
        cache 30
        loop
        reload
        loadbalance
    }
