setup-k3s.sh: fixed setup_helm with error
This commit is contained in:
parent
3cc809b210
commit
ded39399d3
@ -64,24 +64,6 @@ function set_k3s_cni_kubevon()
|
||||
--data-dir=/opt/rancher/k3s \
|
||||
--kube-apiserver-arg service-node-port-range=0-50000
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
funtion setup_helm()
|
||||
{
|
||||
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
|
||||
case `uname -m` in
|
||||
x86_64) ARCH=amd64; ;;
|
||||
aarch64) ARCH=arm64; ;;
|
||||
loongarch64) ARCH=loongarch64; ;;
|
||||
*) echo "un-supported arch, exit ..."; exit 1; ;;
|
||||
esac
|
||||
rm -rf helm.tar.gz* /usr/local/bin/helm || echo true
|
||||
sudo wget --no-check-certificate https://mirrors.onwalk.net/tools/linux-${ARCH}/helm.tar.gz && sudo tar -xvpf helm.tar.gz -C /usr/local/bin/
|
||||
sudo chmod 755 /usr/local/bin/helm
|
||||
|
||||
helm repo add artifact https://artifact.onwalk.net/chartrepo/public/ | echo true
|
||||
helm repo up
|
||||
}
|
||||
|
||||
## __main__ ##
|
||||
@ -91,5 +73,17 @@ if [[ $cni == 'default' ]]; then
|
||||
elif [[ $cni == 'kubeovn' ]]; then
|
||||
set_k3s_cni_kubevon
|
||||
fi
|
||||
setup_helm
|
||||
# end
|
||||
|
||||
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
|
||||
case `uname -m` in
|
||||
x86_64) ARCH=amd64; ;;
|
||||
aarch64) ARCH=arm64; ;;
|
||||
loongarch64) ARCH=loongarch64; ;;
|
||||
*) echo "un-supported arch, exit ..."; exit 1; ;;
|
||||
esac
|
||||
rm -rf helm.tar.gz* /usr/local/bin/helm || echo true
|
||||
sudo wget --no-check-certificate https://mirrors.onwalk.net/tools/linux-${ARCH}/helm.tar.gz && sudo tar -xvpf helm.tar.gz -C /usr/local/bin/
|
||||
sudo chmod 755 /usr/local/bin/helm
|
||||
|
||||
helm repo add artifact https://artifact.onwalk.net/chartrepo/public/ | echo true
|
||||
helm repo up
|
||||
|
||||
Loading…
Reference in New Issue
Block a user