mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-10 12:18:52 +03:00
Set cluster DNS correctly in case of nodelocal dns cache (#3879)
* Set cluster DNS correctly in case of nodelocal dns cache * Pass in cluster_ip based on dns mode * Disable nodelocaldns by default * Fix syntax error * Fix syntax issue * Add nodelocadns ip to vars of node installation * Change location of nodelocaldns_ip * Try to remove newlines from jinja template * Add debug for config file * Move parameter logic outside of template * Adapt templates after feedback * Remove debugging
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
a096761306
commit
68fd7e39da
@@ -14,58 +14,42 @@ data:
|
||||
reload
|
||||
loop
|
||||
bind {{ nodelocaldns_ip }}
|
||||
{% if secondaryclusterIP is defined and dns_mode == 'coredns_dual' %}
|
||||
forward . {{ clusterIP }} {{ secondaryclusterIP }} {
|
||||
{% else %}
|
||||
forward . {{ clusterIP }} {
|
||||
{% endif %}
|
||||
force_tcp
|
||||
forward . {{ forwardTarget }} {
|
||||
force_tcp
|
||||
}
|
||||
prometheus :9253
|
||||
health {{ nodelocaldns_ip }}:8080
|
||||
}
|
||||
}
|
||||
in-addr.arpa:53 {
|
||||
errors
|
||||
cache 30
|
||||
reload
|
||||
loop
|
||||
bind {{ nodelocaldns_ip }}
|
||||
{% if secondaryclusterIP is defined %}
|
||||
forward . {{ clusterIP }} {{ secondaryclusterIP }} {
|
||||
{% else %}
|
||||
forward . {{ clusterIP }} {
|
||||
{% endif %}
|
||||
force_tcp
|
||||
forward . {{ forwardTarget }} {
|
||||
force_tcp
|
||||
}
|
||||
prometheus :9253
|
||||
}
|
||||
}
|
||||
ip6.arpa:53 {
|
||||
errors
|
||||
cache 30
|
||||
reload
|
||||
loop
|
||||
bind {{ nodelocaldns_ip }}
|
||||
{% if secondaryclusterIP is defined %}
|
||||
forward . {{ clusterIP }} {{ secondaryclusterIP }} {
|
||||
{% else %}
|
||||
forward . {{ clusterIP }} {
|
||||
{% endif %}
|
||||
force_tcp
|
||||
forward . {{ forwardTarget }} {
|
||||
force_tcp
|
||||
}
|
||||
prometheus :9253
|
||||
}
|
||||
}
|
||||
.:53 {
|
||||
errors
|
||||
cache 30
|
||||
reload
|
||||
loop
|
||||
bind {{ nodelocaldns_ip }}
|
||||
{% if resolvconf_mode == 'host_resolvconf' and upstream_dns_servers is defined and upstream_dns_servers|length > 0 %}
|
||||
forward . {{ upstream_dns_servers|join(' ') }} {
|
||||
{% else %}
|
||||
forward . /etc/resolv.conf {
|
||||
{% endif %}
|
||||
force_tcp
|
||||
forward . {{ upstreamForwardTarget }} {
|
||||
force_tcp
|
||||
}
|
||||
prometheus :9253
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user