Merge pull request #57296 from xiangpengzhao/update-coredns-corefile

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update CoreDNS version and Corefile in kubeadm

**What this PR does / why we need it**:
We bumped CoreDNS version to 1.0.0 (#56802) and added CoreDNS as an optional addon in kube-up (#55728), but something wrt log was missed.  The log option of CoreDNS was changed since 1.0.0. We should update the Corefile to reflect the change.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes https://github.com/kubernetes/kubernetes/issues/57277

ref: https://github.com/coredns/coredns/issues/1218 https://github.com/coredns/coredns/pull/1221

**Special notes for your reviewer**:
/cc @luxas @rajansandeep
cc @fturib @johnbelamaric

**Release note**:

```release-note
NONE
```
pull/6/head
Kubernetes Submit Queue 2017-12-21 09:49:22 -08:00 committed by GitHub
commit 90b12413f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 12 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -293,7 +293,7 @@ data:
Corefile: |
.:53 {
errors
log stdout
log
health
kubernetes {{ .DNSDomain }} {{ .ServiceCIDR }} {
pods insecure

View File

@ -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