From f42feb1568d38375aa79da074cb07fb171208b7b Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Fri, 8 Dec 2023 12:35:09 +0100 Subject: [PATCH] CKS: update imagePullPolicy to IfNotPresent in yaml files (#8296) The kubernetes dashboard yaml file has the following setting image: kubernetesui/dashboard:v2.7.0 imagePullPolicy: Always see https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml The similar config can be found at https://raw.githubusercontent.com/weaveworks/weave/master/prog/weave-kube/weave-daemonset-k8s-1.11.yaml Due to it, CKS does not work in the following cases reach the dockerhub rate limitations (see https://docs.docker.com/docker-hub/download-rate-limit/) The VMs do not have internet connection Since the CKS ISO contains the image, it is not necessary to pull the images again. --- scripts/util/create-kubernetes-binaries-iso.sh | 3 +++ tools/marvin/marvin/config/test_data.py | 18 +++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/scripts/util/create-kubernetes-binaries-iso.sh b/scripts/util/create-kubernetes-binaries-iso.sh index e7981d6ac0b..d5fb014f220 100755 --- a/scripts/util/create-kubernetes-binaries-iso.sh +++ b/scripts/util/create-kubernetes-binaries-iso.sh @@ -145,6 +145,9 @@ if [ -z "${kubeadm_file_permissions}" ]; then fi chmod ${kubeadm_file_permissions} "${working_dir}/k8s/kubeadm" +echo "Updating imagePullPolicy to IfNotPresent in yaml files..." +sed -i "s/imagePullPolicy:.*/imagePullPolicy: IfNotPresent/g" ${working_dir}/*.yaml + mkisofs -o "${output_dir}/${build_name}" -J -R -l "${iso_dir}" rm -rf "${iso_dir}" diff --git a/tools/marvin/marvin/config/test_data.py b/tools/marvin/marvin/config/test_data.py index c4ac6008b1f..ef9bfd774f7 100644 --- a/tools/marvin/marvin/config/test_data.py +++ b/tools/marvin/marvin/config/test_data.py @@ -2260,11 +2260,23 @@ test_data = { "url": "http://download.cloudstack.org/cks/setup-1.26.0.iso", "mincpunumber": 2, "minmemory": 2048 + }, + "1.27.8": { + "semanticversion": "1.27.8", + "url": "http://download.cloudstack.org/cks/setup-1.27.8.iso", + "mincpunumber": 2, + "minmemory": 2048 + }, + "1.28.4": { + "semanticversion": "1.28.4", + "url": "http://download.cloudstack.org/cks/setup-1.28.4.iso", + "mincpunumber": 2, + "minmemory": 2048 } }, - "cks_kubernetes_version": "1.26.0", - "cks_kubernetes_version_upgrade_from": "1.25.0", - "cks_kubernetes_version_upgrade_to": "1.26.0", + "cks_kubernetes_version": "1.28.4", + "cks_kubernetes_version_upgrade_from": "1.27.8", + "cks_kubernetes_version_upgrade_to": "1.28.4", "cks_service_offering": { "name": "CKS-Instance", "displaytext": "CKS Instance",