update manifest

fix test
pull/8/head
Sandeep Rajan 2018-05-24 08:12:50 -04:00
parent 10b8665a1c
commit 8d8b47596e
6 changed files with 44 additions and 20 deletions

View File

@ -66,6 +66,7 @@ data:
prometheus :9153 prometheus :9153
proxy . /etc/resolv.conf proxy . /etc/resolv.conf
cache 30 cache 30
reload
} }
--- ---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
@ -103,7 +104,7 @@ spec:
operator: "Exists" operator: "Exists"
containers: containers:
- name: coredns - name: coredns
image: coredns/coredns:1.0.6 image: coredns/coredns:1.1.3
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
resources: resources:
limits: limits:
@ -122,6 +123,9 @@ spec:
- containerPort: 53 - containerPort: 53
name: dns-tcp name: dns-tcp
protocol: TCP protocol: TCP
- containerPort: 9153
name: metrics
protocol: TCP
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /health path: /health
@ -145,6 +149,8 @@ kind: Service
metadata: metadata:
name: kube-dns name: kube-dns
namespace: kube-system namespace: kube-system
annotations:
prometheus.io/scrape: "true"
labels: labels:
k8s-app: kube-dns k8s-app: kube-dns
kubernetes.io/cluster-service: "true" kubernetes.io/cluster-service: "true"

View File

@ -66,6 +66,7 @@ data:
prometheus :9153 prometheus :9153
proxy . /etc/resolv.conf proxy . /etc/resolv.conf
cache 30 cache 30
reload
} }
--- ---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
@ -103,7 +104,7 @@ spec:
operator: "Exists" operator: "Exists"
containers: containers:
- name: coredns - name: coredns
image: coredns/coredns:1.0.6 image: coredns/coredns:1.1.3
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
resources: resources:
limits: limits:
@ -122,6 +123,9 @@ spec:
- containerPort: 53 - containerPort: 53
name: dns-tcp name: dns-tcp
protocol: TCP protocol: TCP
- containerPort: 9153
name: metrics
protocol: TCP
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /health path: /health
@ -145,6 +149,8 @@ kind: Service
metadata: metadata:
name: kube-dns name: kube-dns
namespace: kube-system namespace: kube-system
annotations:
prometheus.io/scrape: "true"
labels: labels:
k8s-app: kube-dns k8s-app: kube-dns
kubernetes.io/cluster-service: "true" kubernetes.io/cluster-service: "true"

View File

@ -66,6 +66,7 @@ data:
prometheus :9153 prometheus :9153
proxy . /etc/resolv.conf proxy . /etc/resolv.conf
cache 30 cache 30
reload
} }
--- ---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
@ -103,7 +104,7 @@ spec:
operator: "Exists" operator: "Exists"
containers: containers:
- name: coredns - name: coredns
image: coredns/coredns:1.0.6 image: coredns/coredns:1.1.3
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
resources: resources:
limits: limits:
@ -122,6 +123,9 @@ spec:
- containerPort: 53 - containerPort: 53
name: dns-tcp name: dns-tcp
protocol: TCP protocol: TCP
- containerPort: 9153
name: metrics
protocol: TCP
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /health path: /health
@ -145,6 +149,8 @@ kind: Service
metadata: metadata:
name: kube-dns name: kube-dns
namespace: kube-system namespace: kube-system
annotations:
prometheus.io/scrape: "true"
labels: labels:
k8s-app: kube-dns k8s-app: kube-dns
kubernetes.io/cluster-service: "true" kubernetes.io/cluster-service: "true"

View File

@ -196,6 +196,8 @@ metadata:
kubernetes.io/name: "KubeDNS" kubernetes.io/name: "KubeDNS"
name: kube-dns name: kube-dns
namespace: kube-system namespace: kube-system
annotations:
prometheus.io/scrape: "true"
# Without this resourceVersion value, an update of the Service between versions will yield: # Without this resourceVersion value, an update of the Service between versions will yield:
# Service "kube-dns" is invalid: metadata.resourceVersion: Invalid value: "": must be specified for an update # Service "kube-dns" is invalid: metadata.resourceVersion: Invalid value: "": must be specified for an update
resourceVersion: "0" resourceVersion: "0"
@ -264,6 +266,9 @@ spec:
- containerPort: 53 - containerPort: 53
name: dns-tcp name: dns-tcp
protocol: TCP protocol: TCP
- containerPort: 9153
name: metrics
protocol: TCP
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /health path: /health
@ -303,6 +308,7 @@ data:
prometheus :9153 prometheus :9153
proxy . {{ .UpstreamNameserver }} proxy . {{ .UpstreamNameserver }}
cache 30 cache 30
reload
}{{ .StubDomain }} }{{ .StubDomain }}
` `
// CoreDNSClusterRole is the CoreDNS ClusterRole manifest // CoreDNSClusterRole is the CoreDNS ClusterRole manifest

View File

@ -23,13 +23,13 @@ import (
const ( const (
kubeDNSVersion = "1.14.10" kubeDNSVersion = "1.14.10"
coreDNSVersion = "1.0.6" coreDNSVersion = "1.1.3"
) )
// GetDNSVersion returns the right kube-dns version for a specific k8s version // GetDNSVersion returns the right kube-dns version for a specific k8s version
func GetDNSVersion(kubeVersion *version.Version, dns string) string { func GetDNSVersion(kubeVersion *version.Version, dns string) string {
// v1.9.0+ uses kube-dns 1.14.10 // v1.9.0+ uses kube-dns 1.14.10, if feature gate "CoreDNS" is disabled.
// v1.9.0+ uses CoreDNS 1.0.6 if feature gate "CoreDNS" is enabled. // v1.9.0+ uses CoreDNS 1.1.3.
// In the future when the version is bumped at HEAD; add conditional logic to return the right versions // 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 // Also, the version might be bumped for different k8s releases on the same branch

View File

@ -168,7 +168,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
KubeVersion: "v1.10.3", KubeVersion: "v1.10.3",
KubeadmVersion: "v1.10.3", KubeadmVersion: "v1.10.3",
DNSType: "coredns", DNSType: "coredns",
DNSVersion: "1.0.6", DNSVersion: "1.1.3",
EtcdVersion: "3.1.12", EtcdVersion: "3.1.12",
}, },
}, },
@ -207,7 +207,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
KubeVersion: "v1.10.3", KubeVersion: "v1.10.3",
KubeadmVersion: "v1.10.3", KubeadmVersion: "v1.10.3",
DNSType: "coredns", DNSType: "coredns",
DNSVersion: "1.0.6", DNSVersion: "1.1.3",
EtcdVersion: "3.1.12", EtcdVersion: "3.1.12",
}, },
}, },
@ -246,7 +246,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
KubeVersion: "v1.11.0", KubeVersion: "v1.11.0",
KubeadmVersion: "v1.11.0", KubeadmVersion: "v1.11.0",
DNSType: "coredns", DNSType: "coredns",
DNSVersion: "1.0.6", DNSVersion: "1.1.3",
EtcdVersion: "3.2.18", EtcdVersion: "3.2.18",
}, },
}, },
@ -285,7 +285,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
KubeVersion: "v1.10.5", KubeVersion: "v1.10.5",
KubeadmVersion: "v1.10.5", // Note: The kubeadm version mustn't be "downgraded" here KubeadmVersion: "v1.10.5", // Note: The kubeadm version mustn't be "downgraded" here
DNSType: "coredns", DNSType: "coredns",
DNSVersion: "1.0.6", DNSVersion: "1.1.3",
EtcdVersion: "3.1.12", EtcdVersion: "3.1.12",
}, },
}, },
@ -305,7 +305,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
KubeVersion: "v1.11.1", KubeVersion: "v1.11.1",
KubeadmVersion: "v1.11.1", KubeadmVersion: "v1.11.1",
DNSType: "coredns", DNSType: "coredns",
DNSVersion: "1.0.6", DNSVersion: "1.1.3",
EtcdVersion: "3.2.18", EtcdVersion: "3.2.18",
}, },
}, },
@ -364,7 +364,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
KubeVersion: "v1.11.0-alpha.2", KubeVersion: "v1.11.0-alpha.2",
KubeadmVersion: "v1.11.0-alpha.2", KubeadmVersion: "v1.11.0-alpha.2",
DNSType: "coredns", DNSType: "coredns",
DNSVersion: "1.0.6", DNSVersion: "1.1.3",
EtcdVersion: "3.2.18", EtcdVersion: "3.2.18",
}, },
}, },
@ -404,7 +404,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
KubeVersion: "v1.11.0-alpha.2", KubeVersion: "v1.11.0-alpha.2",
KubeadmVersion: "v1.11.0-alpha.2", KubeadmVersion: "v1.11.0-alpha.2",
DNSType: "coredns", DNSType: "coredns",
DNSVersion: "1.0.6", DNSVersion: "1.1.3",
EtcdVersion: "3.2.18", EtcdVersion: "3.2.18",
}, },
}, },
@ -445,7 +445,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
KubeVersion: "v1.11.0-beta.1", KubeVersion: "v1.11.0-beta.1",
KubeadmVersion: "v1.11.0-beta.1", KubeadmVersion: "v1.11.0-beta.1",
DNSType: "coredns", DNSType: "coredns",
DNSVersion: "1.0.6", DNSVersion: "1.1.3",
EtcdVersion: "3.2.18", EtcdVersion: "3.2.18",
}, },
}, },
@ -486,7 +486,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
KubeVersion: "v1.11.0-rc.1", KubeVersion: "v1.11.0-rc.1",
KubeadmVersion: "v1.11.0-rc.1", KubeadmVersion: "v1.11.0-rc.1",
DNSType: "coredns", DNSType: "coredns",
DNSVersion: "1.0.6", DNSVersion: "1.1.3",
EtcdVersion: "3.2.18", EtcdVersion: "3.2.18",
}, },
}, },
@ -527,7 +527,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
KubeVersion: "v1.11.6-rc.1", KubeVersion: "v1.11.6-rc.1",
KubeadmVersion: "v1.11.6-rc.1", KubeadmVersion: "v1.11.6-rc.1",
DNSType: "coredns", DNSType: "coredns",
DNSVersion: "1.0.6", DNSVersion: "1.1.3",
EtcdVersion: "3.2.18", EtcdVersion: "3.2.18",
}, },
}, },
@ -568,7 +568,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
KubeVersion: "v1.11.0-rc.1", KubeVersion: "v1.11.0-rc.1",
KubeadmVersion: "v1.11.0-rc.1", KubeadmVersion: "v1.11.0-rc.1",
DNSType: "coredns", DNSType: "coredns",
DNSVersion: "1.0.6", DNSVersion: "1.1.3",
EtcdVersion: "3.2.18", EtcdVersion: "3.2.18",
}, },
}, },
@ -588,7 +588,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
KubeVersion: "v1.12.0-alpha.2", KubeVersion: "v1.12.0-alpha.2",
KubeadmVersion: "v1.12.0-alpha.2", KubeadmVersion: "v1.12.0-alpha.2",
DNSType: "coredns", DNSType: "coredns",
DNSVersion: "1.0.6", DNSVersion: "1.1.3",
EtcdVersion: "3.2.18", EtcdVersion: "3.2.18",
}, },
}, },
@ -641,7 +641,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
KubeVersion: "v1.12.1", KubeVersion: "v1.12.1",
KubeadmVersion: "v1.12.1", KubeadmVersion: "v1.12.1",
DNSType: "coredns", DNSType: "coredns",
DNSVersion: "1.0.6", DNSVersion: "1.1.3",
EtcdVersion: "3.2.18", EtcdVersion: "3.2.18",
}, },
}, },
@ -678,7 +678,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
KubeVersion: "v1.12.0", KubeVersion: "v1.12.0",
KubeadmVersion: "v1.12.0", KubeadmVersion: "v1.12.0",
DNSType: "coredns", DNSType: "coredns",
DNSVersion: "1.0.6", DNSVersion: "1.1.3",
EtcdVersion: "3.2.18", EtcdVersion: "3.2.18",
}, },
}, },