Skip to content

Commit 44981e9

Browse files
committed
chore(workflow): add helm mirror
1 parent c4745be commit 44981e9

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

_scripts/install.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ init_arch
2727

2828
function install_helm {
2929
tar_name="helm-canary-linux-${ARCH}.tar.gz"
30-
curl -fsSL -o "${tar_name}" "https://get.helm.sh/${tar_name}"
30+
if [[ "${INSTALL_DRYCC_MIRROR}" == "cn" ]] ; then
31+
helm_download_url="https://drycc-mirrors.oss-accelerate.aliyuncs.com/helm/${tar_name}"
32+
else
33+
helm_download_url="https://get.helm.sh/${tar_name}"
34+
fi
35+
curl -fsSL -o "${tar_name}" "${helm_download_url}"
3136
tar -zxvf "${tar_name}"
3237
mv "linux-${ARCH}/helm" /usr/local/bin/helm
3338
rm -rf "${tar_name}" "linux-${ARCH}"
@@ -80,7 +85,6 @@ function install_cin_plugins {
8085
if [[ "${INSTALL_DRYCC_MIRROR}" == "cn" ]] ; then
8186
cni_plugins_url="https://drycc-mirrors.oss-accelerate.aliyuncs.com/cni/plugins/releases"
8287
else
83-
addons_url="https://github.com/drycc/addons/releases/download/latest/index.yaml"
8488
cni_plugins_url="https://github.com/containernetworking/plugins/releases"
8589
fi
8690
version=$(curl -Ls ${cni_plugins_url}|grep /containernetworking/plugins/releases/tag/ | grep -v no-underline | head -n 1 | cut -d '"' -f 2| awk '{n=split($NF,a,"/");print a[n]}' | awk 'a !~ $0{print}; {a=$0}')
@@ -315,6 +319,8 @@ EOF
315319
systemctl restart haproxy
316320
}
317321

322+
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
323+
318324
if [[ -z "$@" ]] ; then
319325
install_k3s_server
320326
install_helm

0 commit comments

Comments
 (0)