From 40862c3b6045ba198562a0f238dc2bb20758a361 Mon Sep 17 00:00:00 2001 From: Sandeep Rajan Date: Tue, 10 Nov 2020 15:32:48 -0500 Subject: [PATCH] bump coredns to 1.8.0 --- build/dependencies.yaml | 2 +- cmd/kubeadm/app/cmd/config_test.go | 10 +++++----- cmd/kubeadm/app/constants/constants.go | 4 ++-- cmd/kubeadm/app/phases/addons/dns/dns.go | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/build/dependencies.yaml b/build/dependencies.yaml index 13aebcc04ae..202cc6c1973 100644 --- a/build/dependencies.yaml +++ b/build/dependencies.yaml @@ -49,7 +49,7 @@ dependencies: match: k8s.gcr.io/coredns - name: "coredns-kubeadm" - version: 1.7.0 + version: 1.8.0 refPaths: - path: cmd/kubeadm/app/constants/constants.go match: CoreDNSVersion = diff --git a/cmd/kubeadm/app/cmd/config_test.go b/cmd/kubeadm/app/cmd/config_test.go index c40f9699703..edde91fd596 100644 --- a/cmd/kubeadm/app/cmd/config_test.go +++ b/cmd/kubeadm/app/cmd/config_test.go @@ -249,7 +249,7 @@ k8s.gcr.io/kube-scheduler:{{.KubeVersion}} k8s.gcr.io/kube-proxy:{{.KubeVersion}} k8s.gcr.io/pause:{{.PauseVersion}} k8s.gcr.io/etcd:{{.EtcdVersion}} -k8s.gcr.io/coredns:{{.CoreDNSVersion}} +k8s.gcr.io/coredns/coredns:{{.CoreDNSVersion}} `, }, { @@ -268,7 +268,7 @@ k8s.gcr.io/coredns:{{.CoreDNSVersion}} "k8s.gcr.io/kube-proxy:{{.KubeVersion}}", "k8s.gcr.io/pause:{{.PauseVersion}}", "k8s.gcr.io/etcd:{{.EtcdVersion}}", - "k8s.gcr.io/coredns:{{.CoreDNSVersion}}" + "k8s.gcr.io/coredns/coredns:{{.CoreDNSVersion}}" ] } `, @@ -287,7 +287,7 @@ images: - k8s.gcr.io/kube-proxy:{{.KubeVersion}} - k8s.gcr.io/pause:{{.PauseVersion}} - k8s.gcr.io/etcd:{{.EtcdVersion}} -- k8s.gcr.io/coredns:{{.CoreDNSVersion}} +- k8s.gcr.io/coredns/coredns:{{.CoreDNSVersion}} kind: Images `, }, @@ -303,7 +303,7 @@ k8s.gcr.io/kube-scheduler:{{.KubeVersion}} k8s.gcr.io/kube-proxy:{{.KubeVersion}} k8s.gcr.io/pause:{{.PauseVersion}} k8s.gcr.io/etcd:{{.EtcdVersion}} -k8s.gcr.io/coredns:{{.CoreDNSVersion}} +k8s.gcr.io/coredns/coredns:{{.CoreDNSVersion}} `, }, { @@ -313,7 +313,7 @@ k8s.gcr.io/coredns:{{.CoreDNSVersion}} }, outputFormat: `jsonpath={range.images[*]}{@} {end}`, expectedOutput: "k8s.gcr.io/kube-apiserver:{{.KubeVersion}} k8s.gcr.io/kube-controller-manager:{{.KubeVersion}} k8s.gcr.io/kube-scheduler:{{.KubeVersion}} " + - "k8s.gcr.io/kube-proxy:{{.KubeVersion}} k8s.gcr.io/pause:{{.PauseVersion}} k8s.gcr.io/etcd:{{.EtcdVersion}} k8s.gcr.io/coredns:{{.CoreDNSVersion}} ", + "k8s.gcr.io/kube-proxy:{{.KubeVersion}} k8s.gcr.io/pause:{{.PauseVersion}} k8s.gcr.io/etcd:{{.EtcdVersion}} k8s.gcr.io/coredns/coredns:{{.CoreDNSVersion}} ", }, } diff --git a/cmd/kubeadm/app/constants/constants.go b/cmd/kubeadm/app/constants/constants.go index a9313574e17..ecf6d975c3d 100644 --- a/cmd/kubeadm/app/constants/constants.go +++ b/cmd/kubeadm/app/constants/constants.go @@ -323,7 +323,7 @@ const ( CoreDNSDeploymentName = "coredns" // CoreDNSImageName specifies the name of the image for CoreDNS add-on - CoreDNSImageName = "coredns" + CoreDNSImageName = "coredns/coredns" // KubeDNSConfigMap specifies in what ConfigMap in the kube-system namespace the kube-dns config should be stored KubeDNSConfigMap = "kube-dns" @@ -344,7 +344,7 @@ const ( KubeDNSVersion = "1.14.13" // CoreDNSVersion is the version of CoreDNS to be deployed if it is used - CoreDNSVersion = "1.7.0" + CoreDNSVersion = "v1.8.0" // ClusterConfigurationKind is the string kind value for the ClusterConfiguration struct ClusterConfigurationKind = "ClusterConfiguration" diff --git a/cmd/kubeadm/app/phases/addons/dns/dns.go b/cmd/kubeadm/app/phases/addons/dns/dns.go index a1a96e54001..e2d98eaffbe 100644 --- a/cmd/kubeadm/app/phases/addons/dns/dns.go +++ b/cmd/kubeadm/app/phases/addons/dns/dns.go @@ -369,7 +369,7 @@ func isCoreDNSConfigMapMigrationRequired(corefile, currentInstalledCoreDNSVersio if corefile == "" || migration.Default("", corefile) { return isMigrationRequired, nil } - deprecated, err := migration.Deprecated(currentInstalledCoreDNSVersion, kubeadmconstants.CoreDNSVersion, corefile) + deprecated, err := migration.Deprecated(currentInstalledCoreDNSVersion, strings.TrimLeft(kubeadmconstants.CoreDNSVersion, "v"), corefile) if err != nil { return isMigrationRequired, errors.Wrap(err, "unable to get list of changes to the configuration.") } @@ -386,7 +386,7 @@ func isCoreDNSConfigMapMigrationRequired(corefile, currentInstalledCoreDNSVersio func migrateCoreDNSCorefile(client clientset.Interface, cm *v1.ConfigMap, corefile, currentInstalledCoreDNSVersion string) error { // Since the current configuration present is not the default version, try and migrate it. - updatedCorefile, err := migration.Migrate(currentInstalledCoreDNSVersion, kubeadmconstants.CoreDNSVersion, corefile, false) + updatedCorefile, err := migration.Migrate(currentInstalledCoreDNSVersion, strings.TrimLeft(kubeadmconstants.CoreDNSVersion, "v"), corefile, false) if err != nil { return errors.Wrap(err, "unable to migrate CoreDNS ConfigMap") } @@ -411,7 +411,7 @@ func migrateCoreDNSCorefile(client clientset.Interface, cm *v1.ConfigMap, corefi } fmt.Println("[addons] Migrating CoreDNS Corefile") - changes, err := migration.Deprecated(currentInstalledCoreDNSVersion, kubeadmconstants.CoreDNSVersion, corefile) + changes, err := migration.Deprecated(currentInstalledCoreDNSVersion, strings.TrimLeft(kubeadmconstants.CoreDNSVersion, "v"), corefile) if err != nil { return errors.Wrap(err, "unable to get list of changes to the configuration.") }