From 44a36ea36eb189c3b1e136966eb2ad5d73371ada Mon Sep 17 00:00:00 2001 From: Bin Lu Date: Fri, 11 Jan 2019 11:26:31 +0800 Subject: [PATCH] Bug fix: ./hack/local-up-cluster.sh is not work on Arm64 platform Signed-off-by: Bin Lu --- hack/lib/util.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hack/lib/util.sh b/hack/lib/util.sh index cf6bb0edb0e..642b7c5e316 100755 --- a/hack/lib/util.sh +++ b/hack/lib/util.sh @@ -697,6 +697,15 @@ function kube::util::ensure-cfssl { return 0 fi + host_arch=$(kube::util::host_arch) + + if [[ "${host_arch}" != "amd64" ]]; then + echo "Cannot download cfssl on non-amd64 hosts and cfssl does not appear to be installed." + echo "Please install cfssl and cfssljson and verify they are in \$PATH." + echo "Hint: export PATH=\$PATH:\$GOPATH/bin; go get -u github.com/cloudflare/cfssl/cmd/..." + exit 1 + fi + # Create a temp dir for cfssl if no directory was given local cfssldir=${1:-} if [[ -z "${cfssldir}" ]]; then