feat(coredns): coredns_rewrite_block to perform internal message rewriting (#10045)
Signed-off-by: Maxime Leroy <19607336+maxime1907@users.noreply.github.com>pull/10074/head
parent
86b81a855a
commit
4ffe138dfa
|
@ -64,6 +64,10 @@ Custom options to be added 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
|
||||
|
||||
Array of optional external zones to coredns forward queries to. It's injected into
|
||||
|
|
|
@ -18,6 +18,13 @@ coredns_default_zone_cache_block: |
|
|||
# whoami
|
||||
# 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:
|
||||
# policy: sequential
|
||||
|
|
|
@ -38,6 +38,9 @@ data:
|
|||
health {
|
||||
lameduck 5s
|
||||
}
|
||||
{% if coredns_rewrite_block is defined %}
|
||||
{{ coredns_rewrite_block | indent(width=8, first=False) }}
|
||||
{% endif %}
|
||||
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 %}{
|
||||
pods insecure
|
||||
|
|
Loading…
Reference in New Issue