From 50982715688fb0cb601f2da5e1f2c695a440a222 Mon Sep 17 00:00:00 2001 From: Sandeep Rajan Date: Wed, 13 Nov 2019 16:12:35 -0500 Subject: [PATCH] Update CoreDNS version and update manifest (#206) * update version to 1.6.4 and add anti-affinity Signed-off-by: Sandeep Rajan Signed-off-by: Sandeep Rajan * fix indent Signed-off-by: Sandeep Rajan * add lameduck option Signed-off-by: Sandeep Rajan * version to 1.6.5 and change anti-affinity setting Signed-off-by: Sandeep Rajan * remove unsupported options Signed-off-by: Sandeep Rajan * fix indent Signed-off-by: Sandeep Rajan * test by changing replica to 1 Signed-off-by: Sandeep Rajan * do not specify replicas Signed-off-by: Sandeep Rajan * lameduck duration to 5s Signed-off-by: Sandeep Rajan --- kubernetes/coredns.yaml.sed | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/kubernetes/coredns.yaml.sed b/kubernetes/coredns.yaml.sed index 66fe2a3..4c13386 100644 --- a/kubernetes/coredns.yaml.sed +++ b/kubernetes/coredns.yaml.sed @@ -54,7 +54,9 @@ data: Corefile: | .:53 { errors - health + health { + lameduck 5s + } ready kubernetes CLUSTER_DOMAIN REVERSE_CIDRS { pods insecure @@ -77,7 +79,9 @@ metadata: k8s-app: kube-dns kubernetes.io/name: "CoreDNS" spec: - replicas: 2 + # replicas: not specified here: + # 1. Default is 1. + # 2. Will be tuned in real time if DNS horizontal auto-scaling is turned on. strategy: type: RollingUpdate rollingUpdate: @@ -97,9 +101,18 @@ spec: operator: "Exists" nodeSelector: beta.kubernetes.io/os: linux + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: k8s-app + operator: In + values: ["kube-dns"] + topologyKey: kubernetes.io/hostname containers: - name: coredns - image: coredns/coredns:1.6.2 + image: coredns/coredns:1.6.5 imagePullPolicy: IfNotPresent resources: limits: