From 8c8cdfe7b74ffb6a0a73c4129426168c5ef31aa3 Mon Sep 17 00:00:00 2001 From: xiangpengzhao Date: Mon, 18 Dec 2017 11:26:41 +0800 Subject: [PATCH] Update CoreDNS version and Corefile. --- cluster/addons/dns/coredns.yaml.base | 8 +++++--- cluster/addons/dns/coredns.yaml.in | 8 +++++--- cluster/addons/dns/coredns.yaml.sed | 8 +++++--- cmd/kubeadm/app/phases/addons/dns/manifests.go | 2 +- cmd/kubeadm/app/phases/addons/dns/versions.go | 4 ++-- 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/cluster/addons/dns/coredns.yaml.base b/cluster/addons/dns/coredns.yaml.base index 4976ac09a6f..533a4f02af1 100644 --- a/cluster/addons/dns/coredns.yaml.base +++ b/cluster/addons/dns/coredns.yaml.base @@ -57,9 +57,11 @@ data: Corefile: | .:53 { errors - log stdout + log health - kubernetes __PILLAR__DNS__DOMAIN__ __PILLAR__CLUSTER_CIDR__ + kubernetes __PILLAR__DNS__DOMAIN__ __PILLAR__CLUSTER_CIDR__ { + pods insecure + } prometheus proxy . /etc/resolv.conf cache 30 @@ -93,7 +95,7 @@ spec: operator: "Exists" containers: - name: coredns - image: coredns/coredns:0.9.10 + image: coredns/coredns:1.0.1 imagePullPolicy: IfNotPresent resources: limits: diff --git a/cluster/addons/dns/coredns.yaml.in b/cluster/addons/dns/coredns.yaml.in index d2eb1b35796..e56084a3cc9 100644 --- a/cluster/addons/dns/coredns.yaml.in +++ b/cluster/addons/dns/coredns.yaml.in @@ -57,9 +57,11 @@ data: Corefile: | .:53 { errors - log stdout + log health - kubernetes {{ pillar['dns_domain'] }} {{ pillar['service_cluster_ip_range'] }} + kubernetes {{ pillar['dns_domain'] }} {{ pillar['service_cluster_ip_range'] }} { + pods insecure + } prometheus proxy . /etc/resolv.conf cache 30 @@ -93,7 +95,7 @@ spec: operator: "Exists" containers: - name: coredns - image: coredns/coredns:0.9.10 + image: coredns/coredns:1.0.1 imagePullPolicy: IfNotPresent resources: limits: diff --git a/cluster/addons/dns/coredns.yaml.sed b/cluster/addons/dns/coredns.yaml.sed index 329ad6ca23f..4ec582f2edd 100644 --- a/cluster/addons/dns/coredns.yaml.sed +++ b/cluster/addons/dns/coredns.yaml.sed @@ -57,9 +57,11 @@ data: Corefile: | .:53 { errors - log stdout + log health - kubernetes $DNS_DOMAIN $SERVICE_CLUSTER_IP_RANGE + kubernetes $DNS_DOMAIN $SERVICE_CLUSTER_IP_RANGE { + pods insecure + } prometheus proxy . /etc/resolv.conf cache 30 @@ -93,7 +95,7 @@ spec: operator: "Exists" containers: - name: coredns - image: coredns/coredns:0.9.10 + image: coredns/coredns:1.0.1 imagePullPolicy: IfNotPresent resources: limits: diff --git a/cmd/kubeadm/app/phases/addons/dns/manifests.go b/cmd/kubeadm/app/phases/addons/dns/manifests.go index cbf434706da..5dd65612c27 100644 --- a/cmd/kubeadm/app/phases/addons/dns/manifests.go +++ b/cmd/kubeadm/app/phases/addons/dns/manifests.go @@ -293,7 +293,7 @@ data: Corefile: | .:53 { errors - log stdout + log health kubernetes {{ .DNSDomain }} {{ .ServiceCIDR }} { pods insecure diff --git a/cmd/kubeadm/app/phases/addons/dns/versions.go b/cmd/kubeadm/app/phases/addons/dns/versions.go index b68a0b7eee9..96267a9f7f8 100644 --- a/cmd/kubeadm/app/phases/addons/dns/versions.go +++ b/cmd/kubeadm/app/phases/addons/dns/versions.go @@ -27,14 +27,14 @@ const ( kubeDNSProbeSRV = "SRV" kubeDNSProbeA = "A" - coreDNSVersion = "1.0.0" + coreDNSVersion = "1.0.1" ) // GetDNSVersion returns the right kube-dns version for a specific k8s version func GetDNSVersion(kubeVersion *version.Version, dns string) string { // v1.8.0+ uses kube-dns 1.14.5 // v1.9.0+ uses kube-dns 1.14.7 - // v1.9.0+ uses CoreDNS 1.0.0 + // v1.9.0+ uses CoreDNS 1.0.1 // In the future when the version is bumped at HEAD; add conditional logic to return the right versions // Also, the version might be bumped for different k8s releases on the same branch