Browse Source
Added templating to coredns error to allow for consolidation (#10501)
pull/10512/head
Elias-elastisys
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
14 additions and
4 deletions
-
roles/kubernetes-apps/ansible/defaults/main.yml
-
roles/kubernetes-apps/ansible/templates/coredns-config.yml.j2
|
@ -27,6 +27,8 @@ coredns_default_zone_cache_block: | |
|
|
# answer name (.*)\.svc\.cluster\.local {1}.my.domain |
|
|
# 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 apply to coredns forward section as well as nodelocaldns upstream target forward section |
|
|
# dns_upstream_forward_extra_opts: |
|
|
# dns_upstream_forward_extra_opts: |
|
|
|
@ -12,7 +12,11 @@ data: |
|
|
{% for block in coredns_external_zones %} |
|
|
{% for block in coredns_external_zones %} |
|
|
{{ block['zones'] | join(' ') }} { |
|
|
{{ block['zones'] | join(' ') }} { |
|
|
log |
|
|
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 %} |
|
|
{% if block['rewrite'] is defined and block['rewrite'] | length > 0 %} |
|
|
{% for rewrite_match in block['rewrite'] %} |
|
|
{% for rewrite_match in block['rewrite'] %} |
|
|
rewrite {{ rewrite_match }} |
|
|
rewrite {{ rewrite_match }} |
|
@ -31,10 +35,14 @@ data: |
|
|
{% endfor %} |
|
|
{% endfor %} |
|
|
{% endif %} |
|
|
{% endif %} |
|
|
.:53 { |
|
|
.:53 { |
|
|
{% if coredns_additional_configs is defined %} |
|
|
|
|
|
|
|
|
{% if coredns_additional_configs is defined %} |
|
|
{{ coredns_additional_configs | indent(width=8, first=False) }} |
|
|
{{ 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 { |
|
|
health { |
|
|
lameduck 5s |
|
|
lameduck 5s |
|
|
} |
|
|
} |
|
|