You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.7 KiB

9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
  1. #Listen on localhost
  2. {% if dnsmasq_enable_bind_interfaces %}
  3. bind-interfaces
  4. {% endif %}
  5. {% if dnsmasq_listen_address|length > 0 %}
  6. listen-address={{ dnsmasq_listen_address }}
  7. {% endif %}
  8. {% if dnsmasq_addn_hosts|length > 0 %}
  9. addn-hosts={{ dnsmasq_addn_hosts }}
  10. {% endif %}
  11. {% if dnsmasq_enable_strict_order %}
  12. strict-order
  13. {% endif %}
  14. {% if dnsmasq_enable_all_servers %}
  15. all-servers
  16. {% endif %}
  17. # Forward k8s domain to kube-dns
  18. server=/{{ dns_domain }}/{{ skydns_server }}
  19. # Reply NXDOMAIN to bogus domains requests like com.cluster.local.cluster.local
  20. local=/{{ bogus_domains }}
  21. #Set upstream dns servers
  22. {% if dnsmasq_upstream_dns_servers|length > 0 %}
  23. {% for srv in dnsmasq_upstream_dns_servers %}
  24. server={{ srv }}
  25. {% endfor %}
  26. {% endif %}
  27. {% if system_and_upstream_dns_servers|length > 0 %}
  28. {% for srv in system_and_upstream_dns_servers %}
  29. server={{ srv }}
  30. {% endfor %}
  31. {% elif resolvconf_mode == 'host_resolvconf' %}
  32. {# 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 #}
  33. server={{ cloud_resolver }}
  34. {% endif %}
  35. {% if kube_log_level == '4' %}
  36. log-queries
  37. {% endif %}
  38. {% if dnsmasq_enable_no_resolv %}
  39. no-resolv
  40. {% endif %}
  41. {% if dnsmasq_enable_bogus_priv %}
  42. bogus-priv
  43. {% endif %}
  44. {% if dnsmasq_enable_no_negcache %}
  45. no-negcache
  46. {% endif %}
  47. cache-size={{ cache_size }}
  48. dns-forward-max={{ dns_forward_max }}
  49. max-cache-ttl={{ dnsmasq_max_cache_ttl }}
  50. max-ttl={{ dnsmasq_max_ttl }}
  51. log-facility={{ dnsmasq_log_facility }}
  52. {% for dnsmasq_additional_startup_parameter in dnsmasq_additional_startup_parameters %}
  53. {{ dnsmasq_additional_startup_parameter }}
  54. {% endfor %}