You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.0 KiB

  1. apiVersion: v1
  2. kind: ConfigMap
  3. metadata:
  4. name: nodelocaldns
  5. namespace: kube-system
  6. labels:
  7. addonmanager.kubernetes.io/mode: EnsureExists
  8. data:
  9. Corefile: |
  10. {% if nodelocaldns_external_zones is defined and nodelocaldns_external_zones|length > 0 %}
  11. {% for block in nodelocaldns_external_zones %}
  12. {{ block['zones'] | join(' ') }} {
  13. errors
  14. cache {{ block['cache'] | default(30) }}
  15. reload
  16. loop
  17. bind {{ nodelocaldns_ip }}
  18. forward . {{ block['nameservers'] | join(' ') }}
  19. prometheus :9253
  20. log
  21. {% if dns_etchosts | default(None) %}
  22. hosts /etc/coredns/hosts {
  23. fallthrough
  24. }
  25. {% endif %}
  26. }
  27. {% endfor %}
  28. {% endif %}
  29. {{ dns_domain }}:53 {
  30. errors
  31. cache {
  32. success 9984 30
  33. denial 9984 5
  34. }
  35. reload
  36. loop
  37. bind {{ nodelocaldns_ip }}
  38. forward . {{ forwardTarget }} {
  39. force_tcp
  40. }
  41. prometheus :9253
  42. health {{ nodelocaldns_ip }}:{{ nodelocaldns_health_port }}
  43. {% if dns_etchosts | default(None) %}
  44. hosts /etc/coredns/hosts {
  45. fallthrough
  46. }
  47. {% endif %}
  48. }
  49. in-addr.arpa:53 {
  50. errors
  51. cache 30
  52. reload
  53. loop
  54. bind {{ nodelocaldns_ip }}
  55. forward . {{ forwardTarget }} {
  56. force_tcp
  57. }
  58. prometheus :9253
  59. }
  60. ip6.arpa:53 {
  61. errors
  62. cache 30
  63. reload
  64. loop
  65. bind {{ nodelocaldns_ip }}
  66. forward . {{ forwardTarget }} {
  67. force_tcp
  68. }
  69. prometheus :9253
  70. }
  71. .:53 {
  72. errors
  73. cache 30
  74. reload
  75. loop
  76. bind {{ nodelocaldns_ip }}
  77. forward . {{ upstreamForwardTarget }}
  78. prometheus :9253
  79. {% if dns_etchosts | default(None) %}
  80. hosts /etc/coredns/hosts {
  81. fallthrough
  82. }
  83. {% endif %}
  84. }
  85. {% if dns_etchosts | default(None) %}
  86. hosts: |
  87. {{ dns_etchosts }}
  88. {% endif %}