Skip to content

Commit

Permalink
Merge pull request #1113 from marquiz/devel/fedora-fixes
Browse files Browse the repository at this point in the history
e2e: fix kubernetes repo for fedora
  • Loading branch information
klihub authored Sep 6, 2024
2 parents ba771ad + 89b4514 commit d3cae20
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions demo/lib/distro.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF |
[kubernetes]
name=Kubernetes
baseurl=$base
baseurl=https://pkgs.k8s.io/core:/stable:/v$_k8s/rpm/
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=$yumkey $rpmkey
gpgkey=https://pkgs.k8s.io/core:/stable:/v$_k8s/rpm/repodata/repomd.xml.key
EOF
vm-pipe-to-file $repo

Expand Down

0 comments on commit d3cae20

Please sign in to comment.