Add support for dns_etchosts (#6236)

This commit is contained in:
Mateus Caruccio
2020-06-26 04:03:31 -03:00
committed by GitHub
parent d3ca9d1db9
commit 1892cd65f6
6 changed files with 61 additions and 3 deletions

View File

@@ -17,6 +17,11 @@ data:
loadbalance
cache {{ block['cache'] | default(5) }}
reload
{% if dns_etchosts | default(None) %}
hosts /etc/coredns/hosts {
fallthrough
}
{% endif %}
}
{% endfor %}
{% endif %}
@@ -50,4 +55,13 @@ data:
loop
reload
loadbalance
{% if dns_etchosts | default(None) %}
hosts /etc/coredns/hosts {
fallthrough
}
{% endif %}
}
{% if dns_etchosts | default(None) %}
hosts: |
{{ dns_etchosts }}
{% endif %}

View File

@@ -110,3 +110,7 @@ spec:
items:
- key: Corefile
path: Corefile
{% if dns_etchosts | default(None) %}
- key: hosts
path: hosts
{% endif %}

View File

@@ -19,6 +19,11 @@ data:
forward . {{ block['nameservers'] | join(' ') }}
prometheus :9253
log
{% if dns_etchosts | default(None) %}
hosts /etc/coredns/hosts {
fallthrough
}
{% endif %}
}
{% endfor %}
{% endif %}
@@ -36,6 +41,11 @@ data:
}
prometheus :9253
health {{ nodelocaldns_ip }}:{{ nodelocaldns_health_port }}
{% if dns_etchosts | default(None) %}
hosts /etc/coredns/hosts {
fallthrough
}
{% endif %}
}
in-addr.arpa:53 {
errors
@@ -67,4 +77,13 @@ data:
bind {{ nodelocaldns_ip }}
forward . {{ upstreamForwardTarget }}
prometheus :9253
{% if dns_etchosts | default(None) %}
hosts /etc/coredns/hosts {
fallthrough
}
{% endif %}
}
{% if dns_etchosts | default(None) %}
hosts: |
{{ dns_etchosts }}
{% endif %}

View File

@@ -79,6 +79,10 @@ spec:
items:
- key: Corefile
path: Corefile
{% if dns_etchosts | default(None) %}
- key: hosts
path: hosts
{% endif %}
- name: xtables-lock
hostPath:
path: /run/xtables.lock