32 lines
841 B
Django/Jinja
32 lines
841 B
Django/Jinja
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: coredns
|
|
namespace: kube-system
|
|
data:
|
|
Corefile: |
|
|
.:53 {
|
|
errors
|
|
health
|
|
kubernetes {{ dns_domain }} in-addr.arpa ip6.arpa {
|
|
pods insecure
|
|
{% if resolvconf_mode == 'host_resolvconf' and upstream_dns_servers is defined and upstream_dns_servers|length > 0 %}
|
|
upstream {{ upstream_dns_servers|join(' ') }}
|
|
{% else %}
|
|
upstream /etc/resolv.conf
|
|
{% endif %}
|
|
fallthrough in-addr.arpa ip6.arpa
|
|
}
|
|
prometheus :9153
|
|
{% if resolvconf_mode == 'host_resolvconf' and upstream_dns_servers is defined and upstream_dns_servers|length > 0 %}
|
|
proxy . {{ upstream_dns_servers|join(' ') }}
|
|
{% else %}
|
|
proxy . /etc/resolv.conf
|
|
{% endif %}
|
|
cache 30
|
|
loop
|
|
reload
|
|
loadbalance
|
|
}
|