From 9e256fd8b08590203b201822832935ce773056dd Mon Sep 17 00:00:00 2001 From: Vladimir Kozhukalov Date: Tue, 12 Dec 2023 15:10:53 -0600 Subject: [PATCH] Update k8s packages repo For details see the announcement https://kubernetes.io/blog/2023/08/31/legacy-package-repository-deprecation/ Also bump K8s version up to 1.28.4 Change-Id: Ic6b3478e53504622804b6f003ca176a679573d5b --- roles/deploy-env/defaults/main.yaml | 8 ++++++++ roles/deploy-env/files/kubeadm_config.yaml | 2 +- roles/deploy-env/tasks/common_k8s.yaml | 4 ++-- zuul.d/jobs.yaml | 4 +--- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/roles/deploy-env/defaults/main.yaml b/roles/deploy-env/defaults/main.yaml index 4a7c95529..ecf923b43 100644 --- a/roles/deploy-env/defaults/main.yaml +++ b/roles/deploy-env/defaults/main.yaml @@ -10,6 +10,14 @@ # See the License for the specific language governing permissions and # limitations under the License. --- +kube_version_repo: "v1.28" +# the list of k8s package versions are available here +# https://pkgs.k8s.io/core:/stable:/{{ kube_version_repo }}/deb/Packages +kube_version: "1.28.4-1.1" +calico_version: "v3.25" +helm_version: "v3.6.3" +crictl_version: "v1.26.1" + kubectl: user: zuul group: zuul diff --git a/roles/deploy-env/files/kubeadm_config.yaml b/roles/deploy-env/files/kubeadm_config.yaml index 147b0c6ef..8c3d8ef91 100644 --- a/roles/deploy-env/files/kubeadm_config.yaml +++ b/roles/deploy-env/files/kubeadm_config.yaml @@ -4,7 +4,7 @@ kind: KubeProxyConfiguration mode: ipvs ... --- -apiVersion: kubeadm.k8s.io/v1beta2 +apiVersion: kubeadm.k8s.io/v1beta3 kind: ClusterConfiguration networking: serviceSubnet: "{{ kubeadm.service_cidr }}" # --service-cidr diff --git a/roles/deploy-env/tasks/common_k8s.yaml b/roles/deploy-env/tasks/common_k8s.yaml index 530f8ce20..432a45eda 100644 --- a/roles/deploy-env/tasks/common_k8s.yaml +++ b/roles/deploy-env/tasks/common_k8s.yaml @@ -56,12 +56,12 @@ - name: Add Kubernetes apt repository key apt_key: - url: https://packages.cloud.google.com/apt/doc/apt-key.gpg + url: "https://pkgs.k8s.io/core:/stable:/{{ kube_version_repo }}/deb/Release.key" state: present - name: Add Kubernetes apt repository apt_repository: - repo: deb https://apt.kubernetes.io/ kubernetes-xenial main + repo: "deb https://pkgs.k8s.io/core:/stable:/{{ kube_version_repo }}/deb/ /" state: present filename: kubernetes.list diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index efcb22bba..67f2577e5 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -99,9 +99,7 @@ loopback_device: /dev/loop100 loopback_image: "/opt/ext_vol/openstack-helm/ceph-loop.img" ceph_osd_data_device: /dev/loop100 - # the k8s package versions are available here - # https://packages.cloud.google.com/apt/dists/kubernetes-xenial/main/binary-amd64/Packages - kube_version: "1.26.3-00" + kube_version: "1.28.4-1.1" calico_version: "v3.25" helm_version: "v3.6.3" yq_version: "v4.6.0"