force other resolvers to be secondary when using systemd-resolved (#5391)

Change-Id: I33d46c7e0c5374467e22c5a652b282d1703dea85
pull/5403/head
Matthew Mosesohn 2019-12-02 19:41:05 +03:00 committed by Kubernetes Prow Robot
parent e44b0727d5
commit f599a4a859
2 changed files with 5 additions and 9 deletions

View File

@ -137,11 +137,11 @@
set_fact:
coredns_server: |-
{%- if dns_mode == 'coredns' and not dns_early|bool -%}
{{ [ skydns_server ] + upstream_dns_servers|default([]) }}
{{ [ skydns_server ] }}
{%- elif dns_mode == 'coredns_dual' and not dns_early|bool -%}
{{ [ skydns_server ] + [ skydns_server_secondary ] + upstream_dns_servers|default([]) }}
{{ [ skydns_server ] + [ skydns_server_secondary ] }}
{%- elif dns_mode == 'manual' and not dns_early|bool -%}
{{ ( manual_dns_server.split(',') | list) + upstream_dns_servers|default([]) }}
{{ ( manual_dns_server.split(',') | list) }}
{%- elif dns_early|bool -%}
{{ upstream_dns_servers|default([]) }}
{%- endif -%}

View File

@ -1,10 +1,6 @@
[Resolve]
{% if dns_late %}
DNS={{ ( coredns_server + nameservers|d([]) + cloud_resolver|d([])) | unique | join(' ') }}
{% else %}
DNS={{ ( nameservers|d([]) + cloud_resolver|d([])) | unique | join(' ') }}
{% endif %}
#FallbackDNS=
DNS={{ coredns_server | list | join(' ') }}
FallbackDNS={{ ( nameservers|d([]) + cloud_resolver|d([])) | unique | join(' ') }}
Domains={{ ([ 'default.svc.' + dns_domain, 'svc.' + dns_domain ] + searchdomains|default([])) | join(' ') }}
#LLMNR=no
#MulticastDNS=no