From 89b4514512dd609ee349f9825f8a51afcf9868f2 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Fri, 6 Sep 2024 09:30:54 +0300 Subject: [PATCH] e2e: fix kubernetes repo for fedora --- demo/lib/distro.bash | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/demo/lib/distro.bash b/demo/lib/distro.bash index 9fc3d35f9..bea3b227e 100644 --- a/demo/lib/distro.bash +++ b/demo/lib/distro.bash @@ -459,19 +459,21 @@ fedora-install-containerd-post() { } fedora-install-k8s() { + _k8s=$k8s + if [[ -z "$_k8s" ]] || [[ "$_k8s" == "latest" ]]; then + vm-command "curl -s https://api.github.com/repos/kubernetes/kubernetes/releases/latest | grep tag_name | sed -e 's/.*v\([0-9]\+\.[0-9]\+\).*/\1/g'" + _k8s=$COMMAND_OUTPUT + fi + local repo="/etc/yum.repos.d/kubernetes.repo" - local base="https://packages.cloud.google.com/yum/repos/kubernetes-el7-\$basearch" - local yumkey="https://packages.cloud.google.com/yum/doc/yum-key.gpg" - local rpmkey="https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg" cat <