Skip to content

Commit 62db510

Browse files
committed
Allow setting KUBERNETES_NODE_ARCH to download node binaries
1 parent f87fcf6 commit 62db510

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

cluster/get-kube-binaries.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ DOWNLOAD_URL_PREFIX="${KUBERNETES_RELEASE_URL}/${KUBE_VERSION}"
161161
SERVER_PLATFORM="linux"
162162
SERVER_ARCH="${KUBERNETES_SERVER_ARCH:-amd64}"
163163
SERVER_TAR="kubernetes-server-${SERVER_PLATFORM}-${SERVER_ARCH}.tar.gz"
164-
if [[ -n "${KUBERNETES_NODE_PLATFORM-}" ]]; then
165-
NODE_PLATFORM="${KUBERNETES_NODE_PLATFORM}"
166-
NODE_ARCH="${KUBERNETES_NODE_ARCH:-amd64}"
164+
if [[ -n "${KUBERNETES_NODE_PLATFORM-}" || -n "${KUBERNETES_NODE_ARCH-}" ]]; then
165+
NODE_PLATFORM="${KUBERNETES_NODE_PLATFORM:${SERVER_PLATFORM}}"
166+
NODE_ARCH="${KUBERNETES_NODE_ARCH:${SERVER_ARCH}}"
167167
NODE_TAR="kubernetes-node-${NODE_PLATFORM}-${NODE_ARCH}.tar.gz"
168168
fi
169169

cluster/get-kube.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,18 @@
3838
# * arm64
3939
#
4040
# Set KUBERNETES_NODE_PLATFORM to choose the platform for which to download
41-
# the node binaries. If not set (the default) no node binaries will be
42-
# downloaded. The options are:
41+
# the node binaries. If none of KUBERNETES_NODE_PLATFORM and
42+
# KUBERNETES_NODE_ARCH is set, no node binaries will be downloaded. If only
43+
# one of the two is set, the other will be defaulted to the
44+
# KUBERNETES_SERVER_PLATFORM/ARCH.
4345
# * linux
4446
# * windows
4547
#
46-
# Set KUBERNETES_NODE_ARCH to choose the node architecture to download:
48+
# Set KUBERNETES_NODE_ARCH to choose the node architecture to download the
49+
# node binaries. If none of KUBERNETES_NODE_PLATFORM and
50+
# KUBERNETES_NODE_ARCH is set, no node binaries will be downloaded. If only
51+
# one of the two is set, the other will be defaulted to the
52+
# KUBERNETES_SERVER_PLATFORM/ARCH.
4753
# * amd64 [default]
4854
# * arm
4955
# * arm64

0 commit comments

Comments
 (0)