You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sh...@apache.org on 2023/12/08 11:35:16 UTC

(cloudstack) branch 4.18 updated: CKS: update imagePullPolicy to IfNotPresent in yaml files (#8296)

This is an automated email from the ASF dual-hosted git repository.

shwstppr pushed a commit to branch 4.18
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.18 by this push:
     new f42feb1568d CKS: update imagePullPolicy to IfNotPresent in yaml files (#8296)
f42feb1568d is described below

commit f42feb1568d38375aa79da074cb07fb171208b7b
Author: Wei Zhou <we...@apache.org>
AuthorDate: Fri Dec 8 12:35:09 2023 +0100

    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",