diff --git a/tests/gha-run-k8s-common.sh b/tests/gha-run-k8s-common.sh index ab4d22f317..4df12ee816 100644 --- a/tests/gha-run-k8s-common.sh +++ b/tests/gha-run-k8s-common.sh @@ -202,7 +202,15 @@ function get_nodes_and_pods_info() { } function deploy_k0s() { - curl -sSLf https://get.k0s.sh | sudo sh + url=$(get_from_kata_deps ".externals.k0s.url") + + k0s_version_param="" + version=$(get_from_kata_deps ".externals.k0s.version") + if [ -n "${version}" ]; then + k0s_version_param="K0S_VERSION=${version}" + fi + + curl -sSLf ${url} | sudo ${k0s_version_param} sh sudo k0s install controller --single ${KUBERNETES_EXTRA_PARAMS:-} @@ -321,7 +329,7 @@ function _get_k0s_kubernetes_version_for_crio() { # # The CRI-O repo for such version of Kubernetes expects something like: # 1.27 - k0s_version=$(curl -sSLf "https://docs.k0sproject.io/stable.txt") + k0s_version=$(get_from_kata_deps ".externals.k0s.version") # Remove everything after the second '.' crio_version=${k0s_version%\.*+*} diff --git a/versions.yaml b/versions.yaml index f685949fcf..0b0c824299 100644 --- a/versions.yaml +++ b/versions.yaml @@ -300,6 +300,11 @@ externals: url: "https://github.com/lvmteam/lvm2" version: "v2_03_16" + k0s: + description: "K0s Kubernetes distribution, used in cri-o testing" + url: "https://get.k0s.sh" + version: "v1.31.5+k0s.0" + kubernetes: description: "Kubernetes project container manager" url: "https://github.com/kubernetes/kubernetes"