mirror of https://github.com/k3s-io/k3s
Use curl instead of wget to fetch the CNI tarball in e2e-node test
Curl is more ubiquitous than wget. For instance, the GCE centos-7 and rhel-7 image families ship curl by default, but not wget. Looking at the shell scripts under cluster/, they tend to use curl more than wget. (The ones that use wget, such as get-kube.sh, try curl first and only fallback to wget if it's not available.) Tested: by running node-e2e-test on Ubuntu, COS and CentOS.pull/8/head
parent
90c09c75d6
commit
451faff4ef
|
@ -56,7 +56,7 @@ func setupCNI(host, workspace string) error {
|
|||
cniPath := filepath.Join(workspace, cniDirectory)
|
||||
cmd := getSSHCommand(" ; ",
|
||||
fmt.Sprintf("mkdir -p %s", cniPath),
|
||||
fmt.Sprintf("wget -O - %s | tar -xz -C %s", cniURL, cniPath),
|
||||
fmt.Sprintf("curl -s -L %s | tar -xz -C %s", cniURL, cniPath),
|
||||
)
|
||||
if output, err := SSH(host, "sh", "-c", cmd); err != nil {
|
||||
return fmt.Errorf("failed to install cni plugin on %q: %v output: %q", host, err, output)
|
||||
|
|
Loading…
Reference in New Issue