mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-19 14:57:43 -02:30
systemd-resolved: use a drop-in for kubespray dns (#10732)
This avoid needlessly overriding things and make cleanup easier. Also simplifies the template a bit.
This commit is contained in:
@@ -1,21 +1,15 @@
|
||||
[Resolve]
|
||||
{% if dns_early is sameas true and dns_late is sameas false %}
|
||||
#DNS=
|
||||
{% else %}
|
||||
{% if not dns_early and dns_late %}
|
||||
DNS={{ ([nodelocaldns_ip] if enable_nodelocaldns else coredns_server )| list | join(' ') }}
|
||||
{% endif %}
|
||||
FallbackDNS={{ ( upstream_dns_servers|d([]) + nameservers|d([]) + cloud_resolver|d([])) | unique | join(' ') }}
|
||||
{% if remove_default_searchdomains is sameas true and searchdomains|default([])|length != 0 %}
|
||||
{% if remove_default_searchdomains and searchdomains|default([])|length != 0 %}
|
||||
Domains={{ searchdomains|default([]) | join(' ') }}
|
||||
{% else %}
|
||||
Domains={{ ([ 'default.svc.' + dns_domain, 'svc.' + dns_domain ] + searchdomains|default([])) | join(' ') }}
|
||||
{% endif %}
|
||||
#LLMNR=no
|
||||
#MulticastDNS=no
|
||||
DNSSEC=no
|
||||
Cache=no-negative
|
||||
{% if systemd_resolved_disable_stub_listener | bool %}
|
||||
DNSStubListener=no
|
||||
{% else %}
|
||||
#DNSStubListener=yes
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user