diff --git a/charts/eks/templates/_helpers.tpl b/charts/eks/templates/_helpers.tpl index f1471d4f6..86fefd2b9 100644 --- a/charts/eks/templates/_helpers.tpl +++ b/charts/eks/templates/_helpers.tpl @@ -189,9 +189,6 @@ Corefile: |- health ready rewrite name regex .*\.nodes\.vcluster\.com kubernetes.default.svc.cluster.local - {{- if and .Values.coredns.integrated .Values.coredns.plugin.enabled }} - vcluster {{ toYaml .Values.coredns.plugin.config | b64enc }} - {{- end }} kubernetes cluster.local in-addr.arpa ip6.arpa { {{- if .Values.pro }} {{- if .Values.coredns.integrated }} @@ -205,6 +202,9 @@ Corefile: |- fallthrough in-addr.arpa ip6.arpa {{- end }} } + {{- if and .Values.coredns.integrated .Values.coredns.plugin.enabled }} + vcluster {{ toYaml .Values.coredns.plugin.config | b64enc }} + {{- end }} hosts /etc/NodeHosts { ttl 60 reload 15s diff --git a/charts/k0s/templates/_helpers.tpl b/charts/k0s/templates/_helpers.tpl index 2636d5dfb..6cc51b55c 100644 --- a/charts/k0s/templates/_helpers.tpl +++ b/charts/k0s/templates/_helpers.tpl @@ -189,9 +189,6 @@ Corefile: |- health ready rewrite name regex .*\.nodes\.vcluster\.com kubernetes.default.svc.cluster.local - {{- if and .Values.coredns.integrated .Values.coredns.plugin.enabled }} - vcluster {{ toYaml .Values.coredns.plugin.config | b64enc }} - {{- end }} kubernetes cluster.local in-addr.arpa ip6.arpa { {{- if .Values.pro }} {{- if .Values.coredns.integrated }} @@ -205,6 +202,9 @@ Corefile: |- fallthrough in-addr.arpa ip6.arpa {{- end }} } + {{- if and .Values.coredns.integrated .Values.coredns.plugin.enabled }} + vcluster {{ toYaml .Values.coredns.plugin.config | b64enc }} + {{- end }} hosts /etc/NodeHosts { ttl 60 reload 15s diff --git a/charts/k3s/templates/_helpers.tpl b/charts/k3s/templates/_helpers.tpl index c25f28421..f098b3cfd 100644 --- a/charts/k3s/templates/_helpers.tpl +++ b/charts/k3s/templates/_helpers.tpl @@ -189,9 +189,6 @@ Corefile: |- health ready rewrite name regex .*\.nodes\.vcluster\.com kubernetes.default.svc.cluster.local - {{- if and .Values.coredns.integrated .Values.coredns.plugin.enabled }} - vcluster {{ toYaml .Values.coredns.plugin.config | b64enc }} - {{- end }} kubernetes cluster.local in-addr.arpa ip6.arpa { {{- if .Values.pro }} {{- if .Values.coredns.integrated }} @@ -199,12 +196,15 @@ Corefile: |- {{- end }} {{- end }} pods insecure - {{- if .Values.fallbackHostDns }} - fallthrough cluster.local in-addr.arpa ip6.arpa + {{- if or (.Values.fallbackHostDns) (and .Values.coredns.integrated .Values.coredns.plugin.enabled) }} + fallthrough cluster.local in-addr.arpa ip6.arpa {{- else }} fallthrough in-addr.arpa ip6.arpa {{- end }} } + {{- if and .Values.coredns.integrated .Values.coredns.plugin.enabled }} + vcluster {{ toYaml .Values.coredns.plugin.config | b64enc }} + {{- end }} hosts /etc/NodeHosts { ttl 60 reload 15s diff --git a/charts/k8s/templates/_helpers.tpl b/charts/k8s/templates/_helpers.tpl index 327222034..387b16c23 100644 --- a/charts/k8s/templates/_helpers.tpl +++ b/charts/k8s/templates/_helpers.tpl @@ -189,9 +189,6 @@ Corefile: |- health ready rewrite name regex .*\.nodes\.vcluster\.com kubernetes.default.svc.cluster.local - {{- if and .Values.coredns.integrated .Values.coredns.plugin.enabled }} - vcluster {{ toYaml .Values.coredns.plugin.config | b64enc }} - {{- end }} kubernetes cluster.local in-addr.arpa ip6.arpa { {{- if .Values.pro }} {{- if .Values.coredns.integrated }} @@ -205,6 +202,9 @@ Corefile: |- fallthrough in-addr.arpa ip6.arpa {{- end }} } + {{- if and .Values.coredns.integrated .Values.coredns.plugin.enabled }} + vcluster {{ toYaml .Values.coredns.plugin.config | b64enc }} + {{- end }} hosts /etc/NodeHosts { ttl 60 reload 15s