Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix: ./hack/install-etcd.sh is not work on Arm64 platform #72772

Merged
merged 1 commit into from
Feb 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 9 additions & 4 deletions hack/lib/etcd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,16 @@ kube::etcd::cleanup() {
kube::etcd::install() {
(
local os
local arch

os=$(kube::util::host_os)
arch=$(kube::util::host_arch)

cd "${KUBE_ROOT}/third_party"
os=$(uname | tr "[:upper:]" "[:lower:]")
if [[ $(readlink etcd) == etcd-v${ETCD_VERSION}-${os}-* ]]; then
return # already installed
fi

if [[ ${os} == "darwin" ]]; then
download_file="etcd-v${ETCD_VERSION}-darwin-amd64.zip"
url="https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/${download_file}"
Expand All @@ -118,11 +123,11 @@ kube::etcd::install() {
ln -fns "etcd-v${ETCD_VERSION}-darwin-amd64" etcd
rm "${download_file}"
else
url="https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz"
download_file="etcd-v${ETCD_VERSION}-linux-amd64.tar.gz"
url="https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/etcd-v${ETCD_VERSION}-linux-${arch}.tar.gz"
download_file="etcd-v${ETCD_VERSION}-linux-${arch}.tar.gz"
kube::util::download_file "${url}" "${download_file}"
tar xzf "${download_file}"
ln -fns "etcd-v${ETCD_VERSION}-linux-amd64" etcd
ln -fns "etcd-v${ETCD_VERSION}-linux-${arch}" etcd
rm "${download_file}"
fi
kube::log::info "etcd v${ETCD_VERSION} installed. To use:"
Expand Down