Browse Source

[2.19] preinstall: Add nodelocaldns to supersede_nameserver if enabled (#9324)

When a machine that use dhclient and resolvconf reboots, this will make
/etc/resolv.conf remain close to the one before reboot
pull/9417/head
Zhong Jianxin 2 years ago
committed by GitHub
parent
commit
63e3f4dea9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. 2
      roles/kubernetes/preinstall/tasks/0040-set_facts.yml

2
roles/kubernetes/preinstall/tasks/0040-set_facts.yml

@ -190,7 +190,7 @@
nameserverentries: |-
{{ ( ( [nodelocaldns_ip] if enable_nodelocaldns else []) + coredns_server|d([]) + nameservers|d([]) + cloud_resolver|d([]) + configured_nameservers|d([])) | unique | join(',') }}
supersede_nameserver:
supersede domain-name-servers {{ ( coredns_server|d([]) + nameservers|d([]) + cloud_resolver|d([])) | unique | join(', ') }};
supersede domain-name-servers {{ ( ( [nodelocaldns_ip] if enable_nodelocaldns else []) + coredns_server|d([]) + nameservers|d([]) + cloud_resolver|d([])) | unique | join(', ') }};
when: not dns_early or dns_late
# This task should run instead of the above task when cluster/nodelocal DNS hasn't

Loading…
Cancel
Save