From cbbb45d0f98d0496a4183655295ae2c70b3a7398 Mon Sep 17 00:00:00 2001 From: Teddy Andrieux Date: Thu, 29 Apr 2021 10:22:13 +0200 Subject: [PATCH 1/4] release: Bump project version to 2.10.0-dev --- CHANGELOG.md | 2 ++ VERSION | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 507e7f4a59..e6261973b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # CHANGELOG +## Release 2.10.0 (in development) + ## Release 2.9.2 (in development) ## Release 2.9.1 diff --git a/VERSION b/VERSION index edf4030690..9d890143b4 100644 --- a/VERSION +++ b/VERSION @@ -1,4 +1,4 @@ VERSION_MAJOR=2 -VERSION_MINOR=9 -VERSION_PATCH=2 +VERSION_MINOR=10 +VERSION_PATCH=0 VERSION_SUFFIX=-dev From 4cbff7b3d3f8ce3eb095ec02b08fdf05cc2d4e9e Mon Sep 17 00:00:00 2001 From: Teddy Andrieux Date: Thu, 29 Apr 2021 10:26:32 +0200 Subject: [PATCH 2/4] build: Bump Kubernetes version to 1.21.0 --- CHANGELOG.md | 4 ++++ buildchain/buildchain/versions.py | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6261973b9..8daccf2f56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # CHANGELOG ## Release 2.10.0 (in development) +## Enhancements + +- Bump Kubernetes version to 1.21.0 + (PR[#3354](https://github.com/scality/metalk8s/pull/3354)) ## Release 2.9.2 (in development) diff --git a/buildchain/buildchain/versions.py b/buildchain/buildchain/versions.py index bfb99d1ea9..655afed779 100644 --- a/buildchain/buildchain/versions.py +++ b/buildchain/buildchain/versions.py @@ -19,7 +19,7 @@ # Project-wide versions {{{ CALICO_VERSION: str = "3.17.0" -K8S_VERSION: str = "1.20.6" +K8S_VERSION: str = "1.21.0" SALT_VERSION: str = "3002.6" CONTAINERD_VERSION: str = "1.4.3" @@ -137,22 +137,22 @@ def _version_prefix(version: str, prefix: str = "v") -> str: Image( name="kube-apiserver", version=_version_prefix(K8S_VERSION), - digest="sha256:e6d960baa4219fa810ee26da8fe8a92a1cf9dae83b6ad8bda0e17ee159c68501", + digest="sha256:828fefd9598ed865d45364d1be859c87aabfa445b03b350e3440d143bd21bca9", ), Image( name="kube-controller-manager", version=_version_prefix(K8S_VERSION), - digest="sha256:a1a6e8dbcf0294175df5f248503c8792b3770c53535670e44a7724718fc93e87", + digest="sha256:92414283b8a8ba52ad04691a7124aea042e3f2ec3f6384efc5b08da3e100442d", ), Image( name="kube-proxy", version=_version_prefix(K8S_VERSION), - digest="sha256:7c1710c965f55bca8d06ebd8d5774ecd9ef924f33fb024e424c2b9b565f477dc", + digest="sha256:326199e7a5232bf7531a3058e9811c925b07085f33fa882558cc4e89379b9109", ), Image( name="kube-scheduler", version=_version_prefix(K8S_VERSION), - digest="sha256:ebb0350893fcfe7328140452f8a88ce682ec6f00337015a055d51b3fe0373429", + digest="sha256:1bcafcb4a0c3105fe08018f34c0e43a10a5d696fc8598b1c705116bcc773726f", ), Image( name="kube-state-metrics", From fef27eceb4bb08604a5a5b2d60f7b5d4b367c88b Mon Sep 17 00:00:00 2001 From: Teddy Andrieux Date: Thu, 29 Apr 2021 11:02:48 +0200 Subject: [PATCH 3/4] build: Bump CoreDNS version to 1.8.0 --- CHANGELOG.md | 3 +++ buildchain/buildchain/constants.py | 1 + buildchain/buildchain/image.py | 4 +++- buildchain/buildchain/versions.py | 4 ++-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8daccf2f56..73ee700e96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ - Bump Kubernetes version to 1.21.0 (PR[#3354](https://github.com/scality/metalk8s/pull/3354)) +- Bump CoreDNS version to 1.8.0 + (PR[#3354](https://github.com/scality/metalk8s/pull/3354)) + ## Release 2.9.2 (in development) ## Release 2.9.1 diff --git a/buildchain/buildchain/constants.py b/buildchain/buildchain/constants.py index 8e1b5d14ad..991e1248d6 100644 --- a/buildchain/buildchain/constants.py +++ b/buildchain/buildchain/constants.py @@ -18,6 +18,7 @@ # URLs of the main container repositories. CALICO_REPOSITORY: str = "docker.io/calico" +COREDNS_REPOSITORY: str = "k8s.gcr.io/coredns" COREOS_REPOSITORY: str = "quay.io/coreos" DEX_REPOSITORY: str = "docker.io/dexidp" DOCKER_REPOSITORY: str = "docker.io/library" diff --git a/buildchain/buildchain/image.py b/buildchain/buildchain/image.py index 1c69bea945..58dab7584a 100644 --- a/buildchain/buildchain/image.py +++ b/buildchain/buildchain/image.py @@ -171,6 +171,9 @@ def _operator_image(name: str, **kwargs: Any) -> targets.OperatorImage: "calico-node", "calico-kube-controllers", ], + constants.COREDNS_REPOSITORY: [ + "coredns", + ], constants.COREOS_REPOSITORY: [ "kube-state-metrics", ], @@ -181,7 +184,6 @@ def _operator_image(name: str, **kwargs: Any) -> targets.OperatorImage: "nginx", ], constants.GOOGLE_REPOSITORY: [ - "coredns", "etcd", "kube-apiserver", "kube-controller-manager", diff --git a/buildchain/buildchain/versions.py b/buildchain/buildchain/versions.py index 655afed779..3249ad5e04 100644 --- a/buildchain/buildchain/versions.py +++ b/buildchain/buildchain/versions.py @@ -111,8 +111,8 @@ def _version_prefix(version: str, prefix: str = "v") -> str: ), Image( name="coredns", - version="1.7.0", - digest="sha256:73ca82b4ce829766d4f1f10947c3a338888f876fbed0540dc849c89ff256e90c", + version="v1.8.0", + digest="sha256:cc8fb77bc2a0541949d1d9320a641b82fd392b0d3d8145469ca4709ae769980e", ), Image( name="dex", From a7376af548f779335c0b15b455c2c52a53368389 Mon Sep 17 00:00:00 2001 From: Teddy Andrieux Date: Wed, 5 May 2021 17:04:40 +0200 Subject: [PATCH 4/4] chart,salt: Explicitly set Dex namespace from env This just explicitly set Dex namespace for Dex container from environment variable since it's needed as Dex does not yet support Kubernetes version 1.21 Render chart command: ``` ./charts/render.py dex \ --namespace metalk8s-auth charts/dex.yaml \ --service-config dex metalk8s-dex-config \ metalk8s/addons/dex/config/dex.yaml.j2 metalk8s-auth \ --remove-manifest Secret dex \ charts/dex/ > salt/metalk8s/addons/dex/deployed/chart.sls ``` Sees: https://github.com/dexidp/dex/issues/2082 --- charts/dex.yaml | 8 ++++++++ salt/metalk8s/addons/dex/deployed/chart.sls | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/charts/dex.yaml b/charts/dex.yaml index 3ed67ce9b0..8fa7a228d8 100644 --- a/charts/dex.yaml +++ b/charts/dex.yaml @@ -61,6 +61,14 @@ certs: grpc: create: false +# Explicitly set namespace from env since it's needed for Dex in K8s 1.21 +# Sees: https://github.com/dexidp/dex/issues/2082 +env: + - name: KUBERNETES_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + # NOTE: Ignore these values, the configuration is computed from # - salt/metalk8s/addons/dex/config/dex.yaml # - salt/metalk8s/addons/dex/deployed/service-configuration.sls diff --git a/salt/metalk8s/addons/dex/deployed/chart.sls b/salt/metalk8s/addons/dex/deployed/chart.sls index fcc7724631..62b092bc41 100644 --- a/salt/metalk8s/addons/dex/deployed/chart.sls +++ b/salt/metalk8s/addons/dex/deployed/chart.sls @@ -135,7 +135,11 @@ spec: - /usr/local/bin/dex - serve - /etc/dex/cfg/config.yaml - env: [] + env: + - name: KUBERNETES_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace image: {% endraw -%}{{ build_image_name("dex", False) }}{%- raw %}:v2.27.0 imagePullPolicy: IfNotPresent name: main