diff --git a/roles/kubernetes-apps/ansible/defaults/main.yml b/roles/kubernetes-apps/ansible/defaults/main.yml index 37db5b6f5fe..0ec3b702dff 100644 --- a/roles/kubernetes-apps/ansible/defaults/main.yml +++ b/roles/kubernetes-apps/ansible/defaults/main.yml @@ -11,6 +11,8 @@ enable_coredns_reverse_dns_lookups: true coredns_ordinal_suffix: "" # dns_extra_tolerations: [{effect: NoSchedule, operator: "Exists"}] coredns_deployment_nodeselector: "kubernetes.io/os: linux" +coredns_cluster_zone_cache_block: | + cache 30 # nodelocaldns nodelocaldns_cpu_requests: 100m diff --git a/roles/kubernetes-apps/ansible/templates/coredns-config.yml.j2 b/roles/kubernetes-apps/ansible/templates/coredns-config.yml.j2 index f4747cd9f62..e67d9a4d62e 100644 --- a/roles/kubernetes-apps/ansible/templates/coredns-config.yml.j2 +++ b/roles/kubernetes-apps/ansible/templates/coredns-config.yml.j2 @@ -53,7 +53,7 @@ data: {% if enable_coredns_k8s_external %} k8s_external {{ coredns_k8s_external_zone }} {% endif %} - cache 30 +{{ coredns_cluster_zone_cache_block | indent(width=8, first=False) }} loop reload loadbalance