Newer
Older
---
apiVersion: v1
kind: ConfigMap
metadata:
name: coredns
namespace: kube-system
labels:
addonmanager.kubernetes.io/mode: EnsureExists
{% if coredns_external_zones is defined and coredns_external_zones | length > 0 %}
{% for block in coredns_external_zones %}
{{ block['zones'] | join(' ') }} {
errors {
{% if coredns_additional_error_config is defined %}
{{ coredns_additional_error_config | indent(width=10, first=False) }}
{% endif %}
}
{% if block['rewrite'] is defined and block['rewrite'] | length > 0 %}
{% for rewrite_match in block['rewrite'] %}
rewrite {{ rewrite_match }}
{% endfor %}
{% endif %}
forward . {{ block['nameservers'] | join(' ') }}
loadbalance
cache {{ block['cache'] | default(5) }}
reload
{% if dns_etchosts | default(None) %}
hosts /etc/coredns/hosts {
fallthrough
}
{% endif %}
Max Gautier
committed
.:53 {
{% if coredns_additional_configs is defined %}
Navid Nabavi
committed
{{ coredns_additional_configs | indent(width=8, first=False) }}
{% endif %}
errors {
{% if coredns_additional_error_config is defined %}
{{ coredns_additional_error_config | indent(width=10, first=False) }}
{% endif %}
}
Florian Ruynat
committed
health {
lameduck 5s
}
Maxime Leroy
committed
{% if coredns_rewrite_block is defined %}
{{ coredns_rewrite_block | indent(width=8, first=False) }}
{% endif %}
{% for old_dns_domain in old_dns_domains %}
rewrite name suffix {{ old_dns_domain }} {{ dns_domain }} answer auto
{% endfor %}
Marijn van der Giesen
committed
kubernetes {{ dns_domain }} {% if coredns_kubernetes_extra_domains is defined %}{{ coredns_kubernetes_extra_domains }} {% endif %}{% if enable_coredns_reverse_dns_lookups %}in-addr.arpa ip6.arpa {% endif %}{
{% if enable_coredns_k8s_endpoint_pod_names %}
endpoint_pod_names
{% endif %}
{% if enable_coredns_reverse_dns_lookups %}
{% endif %}
{% if coredns_kubernetes_extra_opts is defined %}
{% for opt in coredns_kubernetes_extra_opts %}
{{ opt }}
{% endfor %}
{% endif %}
forward . {{ upstream_dns_servers | join(' ') if upstream_dns_servers is defined and upstream_dns_servers | length > 0 else '/etc/resolv.conf' }} {
{% if dns_upstream_forward_extra_opts is defined %}
{% for optname, optvalue in dns_upstream_forward_extra_opts.items() %}
{{ (optname ~ ' ' ~ optvalue) | trim }}
{# do not add a trailing space when optvalue == ''
workaround for: https://github.com/kubernetes/kubernetes/issues/36222 #}
{% if enable_coredns_k8s_external %}
k8s_external {{ coredns_k8s_external_zone }}
{% endif %}
{{ coredns_default_zone_cache_block | indent(width=8, first=False) }}
Andreas Krüger
committed
loop
reload
loadbalance
{% if dns_etchosts | default(None) %}
hosts /etc/coredns/hosts {
fallthrough
}
{% endif %}
{% if dns_etchosts | default(None) %}
hosts: |
ishizuka
committed
{{ dns_etchosts | indent(width=4, first=False) }}