Skip to content

Commit 5dd61f2

Browse files
committed
update k3s url in agent-install
1 parent 3a2d9a8 commit 5dd61f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/prepare.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ func GenerateAgentScript(masterIP string) {
571571
}
572572

573573
token := strings.TrimSpace(string(tokenData.Bytes()))
574-
k3sCmdSting := fmt.Sprintf("curl -sfL http://rancher-mirror.cnrancher.com/k3s/k3s-install.sh | K3S_URL=https://%s:6443/ K3S_TOKEN=%s sh -s - --node-external-ip $1 --node-name $1\n", masterIP, token)
574+
k3sCmdSting := fmt.Sprintf("curl -sfL $([ \"$INSTALL_K3S_MIRROR\" = \"cn\" ] && echo \"https://rancher-mirror.oss-cn-beijing.aliyuncs.com/k3s/k3s-install.sh\" || echo \"https://get.k3s.io\") | K3S_URL=https://%s:6443/ K3S_TOKEN=%s sh -s - --node-external-ip $1 --node-name $1\n", masterIP, token)
575575

576576
file, err := os.Create("agent-install.sh")
577577
if err != nil {

0 commit comments

Comments
 (0)