apiVersion: v1
kind: ConfigMap
metadata:
  name: node-local-dns
  namespace: kube-system
  labels:
    addonmanager.kubernetes.io/mode: Reconcile
data:
  Corefile: |
    {{ .Values.clusterDomainSuffix }}:53 {
        errors
        cache {
                success 9984 30
                denial 9984 5
        }
        reload
        loop
        bind {{ .Values.localDNSIP }} {{ .Values.clusterIP }}
        forward . __PILLAR__CLUSTER__DNS__ {
                force_tcp
        }
        prometheus :9253
        health {{ .Values.localDNSIP }}:8080
        }
    in-addr.arpa:53 {
        errors
        cache 30
        reload
        loop
        bind {{ .Values.localDNSIP }} {{ .Values.clusterIP }}
        forward . __PILLAR__CLUSTER__DNS__ {
                force_tcp
        }
        prometheus :9253
        }
    ip6.arpa:53 {
        errors
        cache 30
        reload
        loop
        bind {{ .Values.localDNSIP }} {{ .Values.clusterIP }}
        forward . __PILLAR__CLUSTER__DNS__ {
                force_tcp
        }
        prometheus :9253
        }
    .:53 {
        errors
        cache 30
        reload
        loop
        bind {{ .Values.localDNSIP }} {{ .Values.clusterIP }}
        forward . __PILLAR__UPSTREAM__SERVERS__
        prometheus :9253
        }
