Added templating to coredns error to allow for consolidation (#10501)

pull/10512/head
Elias-elastisys 2023-10-10 14:32:41 +02:00 committed by GitHub
parent abaddb4c9b
commit d3101d65aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 4 deletions

View File

@ -27,6 +27,8 @@ coredns_default_zone_cache_block: |
# answer name (.*)\.svc\.cluster\.local {1}.my.domain
# }
# coredns_additional_error_config: |
# consolidate 5m ".* i/o timeout$" warning
# dns_upstream_forward_extra_opts apply to coredns forward section as well as nodelocaldns upstream target forward section
# dns_upstream_forward_extra_opts:

View File

@ -12,7 +12,11 @@ data:
{% for block in coredns_external_zones %}
{{ block['zones'] | join(' ') }} {
log
errors
errors {
{% if coredns_additional_error_config is defined %}
{{ coredns_additional_error_config | indent(width=10, first=False) }}
{% endif %}
}
{% if block['rewrite'] is defined and block['rewrite'] | length > 0 %}
{% for rewrite_match in block['rewrite'] %}
rewrite {{ rewrite_match }}
@ -31,10 +35,14 @@ data:
{% endfor %}
{% endif %}
.:53 {
{% if coredns_additional_configs is defined %}
{% if coredns_additional_configs is defined %}
{{ coredns_additional_configs | indent(width=8, first=False) }}
{% endif %}
errors
{% endif %}
errors {
{% if coredns_additional_error_config is defined %}
{{ coredns_additional_error_config | indent(width=10, first=False) }}
{% endif %}
}
health {
lameduck 5s
}