apiVersion: v1
data:
  Corefile: |
    .:53 {
      health {
        lameduck 5s
      }
      ready
      prometheus :9153
      hosts {
        192.168.2.7  unifi.ankhmorpork.thaum.xyz
        192.168.2.10 spy.ankhmorpork.thaum.xyz
        192.168.2.30 k8sapi.ankhmorpork.thaum.xyz
        192.168.2.30 master01.ankhmorpork.thaum.xyz
        192.168.2.31 node01.ankhmorpork.thaum.xyz
        192.168.2.32 node02.ankhmorpork.thaum.xyz
        192.168.2.33 node03.ankhmorpork.thaum.xyz
        192.168.2.34 node04.ankhmorpork.thaum.xyz
        192.168.2.40 metal01.ankhmorpork.thaum.xyz
        ### local ingress START ###
        192.168.2.91 cookbook.ankhmorpork.thaum.xyz
        192.168.2.91 auth.ankhmorpork.thaum.xyz
        192.168.2.91 weirdo.blog
        192.168.2.91 ankhmorpork.thaum.xyz
        192.168.2.91 ombi.ankhmorpork.thaum.xyz
        192.168.2.91 cloud.krupa.net.pl
        192.168.2.91 grafana.ankhmorpork.thaum.xyz
        192.168.2.91 prometheus.ankhmorpork.thaum.xyz
        192.168.2.91 flux.ankhmorpork.thaum.xyz
        192.168.2.91 home.ankhmorpork.thaum.xyz
        192.168.2.91 alertmanager.ankhmorpork.thaum.xyz
        192.168.2.91 push.ankhmopork.thaum.xyz
        192.168.2.91 rss.ankhmorpork.thaum.xyz
        192.168.2.91 portal.krupa.net.pl
        192.168.2.91 pawel.krupa.net.pl
        192.168.2.91 recipe.krupa.net.pl
        ### local ingress END ###
        fallthrough
      }
      cache {
        success 51200 21600
        prefetch 1000
      }
      forward . 127.0.0.1:5301 127.0.0.1:5302
      # local
      reload
      loadbalance
      log {combined} {
        class denial error
      }
      errors
    }

    .:5301 {
      prometheus :9153
      forward . tls://45.90.28.182 {
        tls_servername {$NEXTDNS_ID}.dns1.nextdns.io
        health_check 2s
      }
    }

    .:5302 {
      prometheus :9153
      forward . tls://45.90.30.182 {
        tls_servername {$NEXTDNS_ID}.dns2.nextdns.io
        health_check 5s
      }
      debug
    }
kind: ConfigMap
metadata:
  labels:
    app.kubernetes.io/component: dns-server
    app.kubernetes.io/name: coredns
    app.kubernetes.io/version: 1.8.4
  name: coredns-corefile
  namespace: dns
