Skip to content

Commit

Permalink
feat: add a paramater to disable host nameservers
Browse files Browse the repository at this point in the history
Signed-off-by: eminaktas <eminaktas34@gmail.com>
  • Loading branch information
eminaktas committed Oct 2, 2022
1 parent f8d5487 commit 8789068
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions inventory/sample/group_vars/all/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ loadbalancer_apiserver_healthcheck_port: 8081

### OTHER OPTIONAL VARIABLES

# If true, doesn't include host nameservers in the nameserverentries
# If enabled, consider defining your DNS servers. Otherwise, there may be problems with dns queries.
# disable_host_nameservers: false

## Upstream dns servers
# upstream_dns_servers:
# - 8.8.8.8
Expand Down
2 changes: 1 addition & 1 deletion roles/kubernetes/preinstall/tasks/0040-set_facts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
- name: generate nameservers for resolvconf, including cluster DNS
set_fact:
nameserverentries: |-
{{ (([nodelocaldns_ip] if enable_nodelocaldns else []) + (coredns_server|d([]) if not enable_nodelocaldns else []) + nameservers|d([]) + cloud_resolver|d([]) + configured_nameservers|d([])) | unique | join(',') }}
{{ (([nodelocaldns_ip] if enable_nodelocaldns else []) + (coredns_server|d([]) if not enable_nodelocaldns else []) + nameservers|d([]) + cloud_resolver|d([]) + (configured_nameservers|d([]) if not disable_host_nameservers|d()|bool else [])) | unique | join(',') }}
supersede_nameserver:
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
Expand Down

0 comments on commit 8789068

Please sign in to comment.