From 3770b200a861ac9c2339e73e47d681c4e6261f88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 3 Oct 2023 17:21:40 +0200 Subject: [PATCH] gha: Fix k0s deployment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tests are failing when setting up k0s, and that happens because we download a kubectl binary matching the kubernetes version k0s is using, and we do that by: ``` sudo k0s kubectl version --short 2>/dev/null | ... ``` With kubectl 1.28, which is now the default on k0s, `kubectl version --short` has been removed, leading us to an empty stringm causing then the error in the CI. Fixes: #8105 Signed-off-by: Fabiano FidĂȘncio (cherry picked from commit 70e7ec3e23020919fbaf83d7b66e40f853f1e4b1) --- tests/gha-run-k8s-common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/gha-run-k8s-common.sh b/tests/gha-run-k8s-common.sh index 2db44cfee6..44b02f32ea 100644 --- a/tests/gha-run-k8s-common.sh +++ b/tests/gha-run-k8s-common.sh @@ -128,7 +128,7 @@ function deploy_k0s() { if [ "${ARCH}" = "x86_64" ]; then ARCH=amd64 fi - kubectl_version=$(sudo k0s kubectl version --short 2>/dev/null | grep "Client Version" | sed -e 's/Client Version: //') + kubectl_version=$(sudo k0s kubectl version 2>/dev/null | grep "Client Version" | sed -e 's/Client Version: //') sudo curl -fL --progress-bar -o /usr/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/${kubectl_version}/bin/linux/${ARCH}/kubectl sudo chmod +x /usr/bin/kubectl