kubernetes/preinstall: dns setting cleanup(dhclient, resolvconf)

We use a lot of facts where variables are enough, and format too early,
which prevent reusing the variables in different contexts.

- Moves set_fact variables to the vars directory, remove unnecessary
 intermediate variables, and render them at usage sites to only do logic
 on native Ansible/Jinja lists.
- Use defaults/ rather than default filters for several variables.
This commit is contained in:
Max Gautier
2024-12-19 11:37:40 +01:00
parent a3e569f5c4
commit 1127a62176
11 changed files with 42 additions and 57 deletions

View File

@@ -114,6 +114,10 @@ dns_mode: coredns
# Enable dns autoscaler
enable_dns_autoscaler: true
# DNS servers added after the cluster DNS
# These will also be used as upstream by Coredns for out-cluster queries
upstream_dns_servers: []
# Enable nodelocal dns cache
enable_nodelocaldns: true
enable_nodelocaldns_secondary: false
@@ -137,6 +141,7 @@ dns_domain: "{{ cluster_name }}"
docker_dns_search_domains:
- 'default.svc.{{ dns_domain }}'
- 'svc.{{ dns_domain }}'
searchdomains: []
kube_dns_servers:
coredns: ["{{ skydns_server }}"]