From 94093d9cbc0d8c13899fea72d29353776342d3fa Mon Sep 17 00:00:00 2001 From: gajju26 Date: Mon, 2 Nov 2015 15:59:24 +0530 Subject: [PATCH] Added support for IBM z Systems architecture (s390x) --- cluster/get-kube.sh | 4 +++- cluster/kubectl.sh | 5 ++++- hack/lib/util.sh | 7 +++++-- hack/local-up-cluster.sh | 5 ++++- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/cluster/get-kube.sh b/cluster/get-kube.sh index 0cc0ac9aae..e58fad2653 100755 --- a/cluster/get-kube.sh +++ b/cluster/get-kube.sh @@ -94,9 +94,11 @@ elif [[ "${machine}" == "i686" ]]; then arch="386" elif [[ "${machine}" == "arm*" ]]; then arch="arm" +elif [[ "${machine}" == "s390x*" ]]; then + arch="s390x" else echo "Unknown, unsupported architecture (${machine})." - echo "Supported architectures x86_64, i686, arm*" + echo "Supported architectures x86_64, i686, arm, s390x." echo "Bailing out." exit 3 fi diff --git a/cluster/kubectl.sh b/cluster/kubectl.sh index 2cf93587e7..9511b1bdd9 100755 --- a/cluster/kubectl.sh +++ b/cluster/kubectl.sh @@ -70,8 +70,11 @@ case "$(uname -m)" in i?86*) host_arch=386 ;; + s390x*) + host_arch=s390x + ;; *) - echo "Unsupported host arch. Must be x86_64, 386 or arm." >&2 + echo "Unsupported host arch. Must be x86_64, 386, arm or s390x." >&2 exit 1 ;; esac diff --git a/hack/lib/util.sh b/hack/lib/util.sh index 4e2b4911eb..d7f90276a6 100755 --- a/hack/lib/util.sh +++ b/hack/lib/util.sh @@ -150,8 +150,11 @@ kube::util::host_platform() { i?86*) host_arch=x86 ;; - *) - kube::log::error "Unsupported host arch. Must be x86_64, 386 or arm." + s390x*) + host_arch=s390x + ;; + *) + kube::log::error "Unsupported host arch. Must be x86_64, 386, arm or s390x." exit 1 ;; esac diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index 92d370bd57..22851c27d3 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -135,8 +135,11 @@ function detect_binary { i?86*) host_arch=x86 ;; + s390x*) + host_arch=s390x + ;; *) - echo "Unsupported host arch. Must be x86_64, 386 or arm." >&2 + echo "Unsupported host arch. Must be x86_64, 386, arm or s390x." >&2 exit 1 ;; esac