Merge pull request #10883 from stevenhorsman/k0s-version-pinning

ci: k8s: Pin k0s version to get cri-o tests back working
This commit is contained in:
Wainer Moschetta
2025-02-27 10:11:59 -03:00
committed by GitHub
2 changed files with 15 additions and 2 deletions

View File

@@ -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%\.*+*}

View File

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