Merge "Gate/Dev: Allow custom upstream dns servers to be preserved"
This commit is contained in:
commit
0f2dace4e8
@ -181,6 +181,16 @@
|
|||||||
file:
|
file:
|
||||||
path: "/etc/kubernetes/manifests/"
|
path: "/etc/kubernetes/manifests/"
|
||||||
state: directory
|
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
|
- name: Setup DNS redirector | Placing pod manifest on host
|
||||||
template:
|
template:
|
||||||
src: osh-dns-redirector.yaml.j2
|
src: osh-dns-redirector.yaml.j2
|
||||||
|
@ -20,11 +20,17 @@ spec:
|
|||||||
- --no-hosts
|
- --no-hosts
|
||||||
- --bind-interfaces
|
- --bind-interfaces
|
||||||
- --all-servers
|
- --all-servers
|
||||||
{% for nameserver in external_dns_nameservers %}
|
|
||||||
- --server={{ nameserver }}
|
|
||||||
{% endfor %}
|
|
||||||
- --address
|
- --address
|
||||||
- /{{ gate.fqdn_tld }}/{{ gate.ingress_ip }}
|
- /{{ gate.fqdn_tld }}/{{ gate.ingress_ip }}
|
||||||
# NOTE(portdirect): just listen on the docker0 interface
|
# NOTE(portdirect): just listen on the docker0 interface
|
||||||
- --listen-address
|
- --listen-address
|
||||||
- 172.17.0.1
|
- 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