mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 09:39:12 +03:00
feat(coredns): coredns_rewrite_block to perform internal message rewriting (#10045)
Signed-off-by: Maxime Leroy <19607336+maxime1907@users.noreply.github.com>
This commit is contained in:
@@ -64,6 +64,10 @@ Custom options to be added to the kubernetes coredns plugin.
|
|||||||
|
|
||||||
Extra domains to be forwarded to the kubernetes coredns plugin.
|
Extra domains to be forwarded to the kubernetes coredns plugin.
|
||||||
|
|
||||||
|
### coredns_rewrite_block
|
||||||
|
|
||||||
|
[Rewrite](https://coredns.io/plugins/rewrite/) plugin block to perform internal message rewriting.
|
||||||
|
|
||||||
### coredns_external_zones
|
### coredns_external_zones
|
||||||
|
|
||||||
Array of optional external zones to coredns forward queries to. It's injected into
|
Array of optional external zones to coredns forward queries to. It's injected into
|
||||||
|
|||||||
@@ -18,6 +18,13 @@ coredns_default_zone_cache_block: |
|
|||||||
# whoami
|
# whoami
|
||||||
# local
|
# local
|
||||||
|
|
||||||
|
# coredns_rewrite_block: |
|
||||||
|
# rewrite stop {
|
||||||
|
# name regex (.*)\.my\.domain {1}.svc.cluster.local
|
||||||
|
# answer name (.*)\.svc\.cluster\.local {1}.my.domain
|
||||||
|
# }
|
||||||
|
|
||||||
|
|
||||||
# dns_upstream_forward_extra_opts apply to coredns forward section as well as nodelocaldns upstream target forward section
|
# dns_upstream_forward_extra_opts apply to coredns forward section as well as nodelocaldns upstream target forward section
|
||||||
# dns_upstream_forward_extra_opts:
|
# dns_upstream_forward_extra_opts:
|
||||||
# policy: sequential
|
# policy: sequential
|
||||||
|
|||||||
@@ -38,6 +38,9 @@ data:
|
|||||||
health {
|
health {
|
||||||
lameduck 5s
|
lameduck 5s
|
||||||
}
|
}
|
||||||
|
{% if coredns_rewrite_block is defined %}
|
||||||
|
{{ coredns_rewrite_block | indent(width=8, first=False) }}
|
||||||
|
{% endif %}
|
||||||
ready
|
ready
|
||||||
kubernetes {{ dns_domain }} {% if coredns_kubernetes_extra_domains is defined %}{{ coredns_kubernetes_extra_domains }} {% endif %}{% if enable_coredns_reverse_dns_lookups %}in-addr.arpa ip6.arpa {% endif %}{
|
kubernetes {{ dns_domain }} {% if coredns_kubernetes_extra_domains is defined %}{{ coredns_kubernetes_extra_domains }} {% endif %}{% if enable_coredns_reverse_dns_lookups %}in-addr.arpa ip6.arpa {% endif %}{
|
||||||
pods insecure
|
pods insecure
|
||||||
|
|||||||
Reference in New Issue
Block a user