Skip to content

Commit

Permalink
Fix helm install
Browse files Browse the repository at this point in the history
  • Loading branch information
fjammes committed Aug 26, 2024
1 parent ac21993 commit bd9ad60
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions resources/install-helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,23 @@

set -euxo pipefail

HELM_VERSION="3.14.4"
curl -o /tmp/helm.tgz https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz
helm_bin="/usr/local/bin/helm"
helm_version="3.14.4"

cd /tmp
tar zxvf /tmp/helm.tgz
rm /tmp/helm.tgz
sudo install -m 555 /tmp/linux-amd64/helm /usr/local/bin/helm
rm /tmp/linux-amd64/helm

# If helm exists, compare current version to desired one
if [ -e $helm_bin ]; then
current_version=$(helm version --short)
else
current_version=""
fi

if [[ $current_version =~ "$helm_version" ]]; then
echo "WARN: helm helm_version is already installed"
else
tmp_dir=$(mktemp -d --suffix "-ktbx-helm")
curl -o "$tmp_dir"/helm.tgz https://get.helm.sh/helm-v${helm_version}-linux-amd64.tar.gz
tar -C "$tmp_dir" -zxvf "$tmp_dir"/helm.tgz
sudo install -m 555 "$tmp_dir"/linux-amd64/helm "$helm_bin"
rm -r "$tmp_dir"
fi

0 comments on commit bd9ad60

Please sign in to comment.