Skip to content
Snippets Groups Projects
Unverified Commit 4ffe138d authored by Maxime Leroy's avatar Maxime Leroy Committed by GitHub
Browse files

feat(coredns): coredns_rewrite_block to perform internal message rewriting (#10045)

parent 86b81a85
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment