From 562b4acbee1f2d7486d2809a63f69642389033c8 Mon Sep 17 00:00:00 2001 From: Matthew Mosesohn Date: Mon, 10 Oct 2016 17:21:31 +0300 Subject: [PATCH] Add default GCE hardcoded nameservers Used only when cloud_provider=gce --- roles/dnsmasq/templates/01-kube-dns.conf.j2 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/roles/dnsmasq/templates/01-kube-dns.conf.j2 b/roles/dnsmasq/templates/01-kube-dns.conf.j2 index cad7f8ea3..d5a0c44da 100644 --- a/roles/dnsmasq/templates/01-kube-dns.conf.j2 +++ b/roles/dnsmasq/templates/01-kube-dns.conf.j2 @@ -10,12 +10,14 @@ server=/{{ dns_domain }}/{{ skydns_server }} #Set upstream dns servers {% if upstream_dns_servers is defined %} -{% for srv in upstream_dns_servers %} +{% for srv in upstream_dns_servers %} server={{ srv }} -{% endfor %} +{% endfor %} +{% elif cloud_provider == "gce" %} +server=169.254.169.254 {% else %} - server=8.8.8.8 - server=8.8.4.4 +server=8.8.8.8 +server=8.8.4.4 {% endif %} bogus-priv