From 1101ec0c8d4d455aadf995403a03e04fd54e554c Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Wed, 16 Mar 2022 12:16:07 +0100 Subject: [PATCH] ci: add GOARCH to path for copying kubectl minikube 1.25.2 moved the downloaded kubectl and other binaries to a new subdir; it now includes runtime.GOARCH as an extra component. See-also: kubernetes/minikube#13539 Signed-off-by: Niels de Vos --- single-node-k8s.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/single-node-k8s.sh b/single-node-k8s.sh index c6ae47cde..a678ee11d 100755 --- a/single-node-k8s.sh +++ b/single-node-k8s.sh @@ -100,7 +100,13 @@ function install_minikube() MINIKUBE_VERSION="${MINIKUBE_VERSION}" KUBE_VERSION="${k8s_version}" ${GOPATH}/src/github.com/ceph/ceph-csi/scripts/minikube.sh up # copy kubectl from minikube to /usr/bin - cp ~/.minikube/cache/linux/"${k8s_version}"/kubectl /usr/bin/ + if [ -x ~/.minikube/cache/linux/"${k8s_version}"/kubectl ] + then + cp ~/.minikube/cache/linux/"${k8s_version}"/kubectl /usr/bin/ + else + # minikube 1.25.2 adds the GOARCH to the path ("amd64" in our CI) + cp ~/.minikube/cache/linux/amd64/"${k8s_version}"/kubectl /usr/bin/ + fi # scan for extra disks minikube ssh 'echo 1 | sudo tee /sys/bus/pci/rescan > /dev/null ; dmesg | grep virtio_blk'