Gate/Dev: Allow custom upstream dns servers to be preserved
This PS updates the dns redirect pod deployment to support a persistant set of customised upstream nameservers to be used. Change-Id: Ib163f8ed9ceadca69b56cd5f146ffd194d98cdc3 Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
parent
a46d006fd3
commit
79d11e4044
@ -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
|
||||
|
@ -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
|
||||
|
@ -0,0 +1,4 @@
|
||||
{% for nameserver in external_dns_nameservers %}
|
||||
nameserver {{ nameserver }}
|
||||
{% endfor %}
|
||||
options timeout:1 attempts:1
|
Loading…
x
Reference in New Issue
Block a user