mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-23 17:58:02 +00:00
tests: k0s: Always use latest version, apart from CRI-O tests
We've been pinning a specific version of k0s for CRI-O tests, which may make sense for CRI-O, but doesn't make sense at all when it comes to testing that we can install kata-deploy on latest k0s (and currently our test for that is broken). Let's bump to the latest, and from this point we start debugging, instead of debugging on an ancient version of the project. Signed-off-by: Fabiano Fidêncio <fidencio@northflank.com>
This commit is contained in:
@@ -31,6 +31,7 @@ KATA_HOST_OS="${KATA_HOST_OS:-}"
|
||||
KUBERNETES="${KUBERNETES:-}"
|
||||
K8S_TEST_HOST_TYPE="${K8S_TEST_HOST_TYPE:-small}"
|
||||
TEST_CLUSTER_NAMESPACE="${TEST_CLUSTER_NAMESPACE:-}"
|
||||
CONTAINER_RUNTIME="${CONTAINER_RUNTIME:-containerd}"
|
||||
|
||||
function _print_instance_type() {
|
||||
case "${K8S_TEST_HOST_TYPE}" in
|
||||
@@ -192,16 +193,20 @@ function get_nodes_and_pods_info() {
|
||||
}
|
||||
|
||||
function deploy_k0s() {
|
||||
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}"
|
||||
if [[ "${CONTAINER_RUNTIME}" == "crio" ]]; then
|
||||
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
|
||||
else
|
||||
curl -sSLf -sSLf https://get.k0s.sh | sudo sh
|
||||
fi
|
||||
|
||||
curl -sSLf "${url}" | sudo "${k0s_version_param}" sh
|
||||
|
||||
# In this case we explicitly want word splitting when calling k0s
|
||||
# with extra parameters.
|
||||
# shellcheck disable=SC2086
|
||||
|
Reference in New Issue
Block a user