Merge "Gate/Dev: Allow custom upstream dns servers to be preserved"

This commit is contained in:
Zuul 2018-09-15 16:59:22 +00:00 committed by Gerrit Code Review
commit 0f2dace4e8
3 changed files with 23 additions and 3 deletions

View File

@ -181,6 +181,16 @@
file:
path: "/etc/kubernetes/manifests/"
state: directory
- name: Setup DNS redirector | check if an resolv-upstream.conf exists
stat:
path: /etc/resolv-upstream.conf
register: resolv_upstream_conf
- name: Setup DNS redirector | Placing pod manifest on host
when: resolv_upstream_conf.stat.exists == False
template:
src: resolv-upstream.conf.j2
dest: /etc/resolv-upstream.conf
mode: 0640
- name: Setup DNS redirector | Placing pod manifest on host
template:
src: osh-dns-redirector.yaml.j2

View File

@ -20,11 +20,17 @@ spec:
- --no-hosts
- --bind-interfaces
- --all-servers
{% for nameserver in external_dns_nameservers %}
- --server={{ nameserver }}
{% endfor %}
- --address
- /{{ gate.fqdn_tld }}/{{ gate.ingress_ip }}
# NOTE(portdirect): just listen on the docker0 interface
- --listen-address
- 172.17.0.1
volumeMounts:
- mountPath: /etc/resolv.conf
name: resolv-conf
readOnly: true
volumes:
- name: resolv-conf
hostPath:
path: /etc/resolv-upstream.conf
type: FileOrCreate

View File

@ -0,0 +1,4 @@
{% for nameserver in external_dns_nameservers %}
nameserver {{ nameserver }}
{% endfor %}
options timeout:1 attempts:1