From 7fce68ec830c0ad4ee115c1255998248cc0c8dc7 Mon Sep 17 00:00:00 2001 From: gjmzj Date: Fri, 24 Jan 2020 09:18:13 +0800 Subject: [PATCH] bump coredns version 1.6.6 --- roles/cluster-addon/defaults/main.yml | 2 +- roles/cluster-addon/templates/coredns.yaml.j2 | 15 +++++++++++++-- tools/easzup | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/roles/cluster-addon/defaults/main.yml b/roles/cluster-addon/defaults/main.yml index 1abf242..0df1d0e 100644 --- a/roles/cluster-addon/defaults/main.yml +++ b/roles/cluster-addon/defaults/main.yml @@ -4,7 +4,7 @@ dns_backend: "coredns" # 设置 dns svc ip (这里选用 SERVICE_CIDR 中第2个IP) CLUSTER_DNS_SVC_IP: "{{ SERVICE_CIDR | ipaddr('net') | ipaddr(2) | ipaddr('address') }}" kubednsVer: "1.14.13" -corednsVer: "1.6.2" +corednsVer: "1.6.6" kubedns_offline: "kubedns_{{ kubednsVer }}.tar" coredns_offline: "coredns_{{ corednsVer }}.tar" dns_offline: "{%- if dns_backend == 'coredns' -%} \ diff --git a/roles/cluster-addon/templates/coredns.yaml.j2 b/roles/cluster-addon/templates/coredns.yaml.j2 index a798356..fee293d 100644 --- a/roles/cluster-addon/templates/coredns.yaml.j2 +++ b/roles/cluster-addon/templates/coredns.yaml.j2 @@ -54,7 +54,9 @@ data: Corefile: | .:53 { errors - health + health { + lameduck 5s + } ready kubernetes {{ CLUSTER_DNS_DOMAIN }} in-addr.arpa ip6.arpa { pods insecure @@ -67,7 +69,7 @@ data: loadbalance } --- -apiVersion: apps/v1 +apiVersion: apps/v1 kind: Deployment metadata: name: coredns @@ -96,6 +98,15 @@ 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:{{ corednsVer }} diff --git a/tools/easzup b/tools/easzup index 8c23b68..aaaa56e 100755 --- a/tools/easzup +++ b/tools/easzup @@ -185,7 +185,7 @@ function get_sys_pkg() { function get_offline_image() { # images needed by k8s cluster calicoVer=v3.4.4 - corednsVer=1.6.2 + corednsVer=1.6.6 dashboardVer=v2.0.0-beta6 dashboardMetricsScraperVer=v1.0.2 flannelVer=v0.11.0-amd64