Browse Source

Only use default resolver in dnsmasq when we are using host_resolvconf mode

pull/799/head
Alexander Block 7 years ago
parent
commit
a8b5b856d1
1 changed files with 4 additions and 2 deletions
  1. 6
      roles/dnsmasq/templates/01-kube-dns.conf.j2

6
roles/dnsmasq/templates/01-kube-dns.conf.j2

@ -15,15 +15,17 @@ local=/{{ bogus_domains }}
{% for srv in upstream_dns_servers %} {% for srv in upstream_dns_servers %}
server={{ srv }} server={{ srv }}
{% endfor %} {% endfor %}
{% else %}
no-resolv
{% elif resolvconf_mode == 'host_resolvconf' %}
{# The default resolver is only needed when the hosts resolv.conf was modified by us. If it was not modified, we can rely on dnsmasq to reuse the systems resolv.conf #}
server={{ default_resolver }} server={{ default_resolver }}
no-resolv
{% endif %} {% endif %}
{% if kube_log_level == '4' %} {% if kube_log_level == '4' %}
log-queries log-queries
{% endif %} {% endif %}
bogus-priv bogus-priv
no-resolv
no-negcache no-negcache
cache-size=1000 cache-size=1000
max-cache-ttl=10 max-cache-ttl=10

Loading…
Cancel
Save