[systemd-resolved] Fix DNS configuration according to docs/dns-stack.md and during reset of cluster (#8560) (#8561)
This commit is contained in:
parent
fb7c56e3d3
commit
d444a2fb83
2 changed files with 6 additions and 1 deletions
|
@ -32,4 +32,5 @@
|
||||||
environment: "{{ proxy_disable_env }}"
|
environment: "{{ proxy_disable_env }}"
|
||||||
roles:
|
roles:
|
||||||
- { role: kubespray-defaults}
|
- { role: kubespray-defaults}
|
||||||
|
- { role: kubernetes/preinstall, when: "dns_mode != 'none' and resolvconf_mode == 'host_resolvconf'", tags: resolvconf, dns_early: true }
|
||||||
- { role: reset, tags: reset }
|
- { role: reset, tags: reset }
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
[Resolve]
|
[Resolve]
|
||||||
|
{% if dns_early is sameas true and dns_late is sameas false %}
|
||||||
|
#DNS=
|
||||||
|
{% else %}
|
||||||
DNS={{ ([nodelocaldns_ip] if enable_nodelocaldns else coredns_server )| list | join(' ') }}
|
DNS={{ ([nodelocaldns_ip] if enable_nodelocaldns else coredns_server )| list | join(' ') }}
|
||||||
FallbackDNS={{ ( nameservers|d([]) + cloud_resolver|d([])) | unique | join(' ') }}
|
{% endif %}
|
||||||
|
FallbackDNS={{ ( upstream_dns_servers|d([]) + nameservers|d([]) + cloud_resolver|d([])) | unique | join(' ') }}
|
||||||
Domains={{ ([ 'default.svc.' + dns_domain, 'svc.' + dns_domain ] + searchdomains|default([])) | join(' ') }}
|
Domains={{ ([ 'default.svc.' + dns_domain, 'svc.' + dns_domain ] + searchdomains|default([])) | join(' ') }}
|
||||||
#LLMNR=no
|
#LLMNR=no
|
||||||
#MulticastDNS=no
|
#MulticastDNS=no
|
||||||
|
|
Loading…
Reference in a new issue