mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
cleanup: we always need to download client and server tarballs
This commit is contained in:
parent
56949c7834
commit
b360f95eb3
@ -174,21 +174,8 @@ echo "Server: ${SERVER_PLATFORM}/${SERVER_ARCH} (to override, set KUBERNETES_SE
|
|||||||
echo "Client: ${CLIENT_PLATFORM}/${CLIENT_ARCH} (autodetected)"
|
echo "Client: ${CLIENT_PLATFORM}/${CLIENT_ARCH} (autodetected)"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# TODO: remove this check and default to true when we stop shipping server
|
echo "Will download ${SERVER_TAR} from ${DOWNLOAD_URL_PREFIX}"
|
||||||
# tarballs in kubernetes.tar.gz
|
echo "Will download and extract ${CLIENT_TAR} from ${DOWNLOAD_URL_PREFIX}"
|
||||||
DOWNLOAD_SERVER_TAR=false
|
|
||||||
if [[ ! -e "${KUBE_ROOT}/server/${SERVER_TAR}" ]]; then
|
|
||||||
DOWNLOAD_SERVER_TAR=true
|
|
||||||
echo "Will download ${SERVER_TAR} from ${DOWNLOAD_URL_PREFIX}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# TODO: remove this check and default to true when we stop shipping kubectl
|
|
||||||
# in kubernetes.tar.gz
|
|
||||||
DOWNLOAD_CLIENT_TAR=false
|
|
||||||
if [[ ! -x "${KUBE_ROOT}/platforms/${CLIENT_PLATFORM}/${CLIENT_ARCH}/kubectl" ]]; then
|
|
||||||
DOWNLOAD_CLIENT_TAR=true
|
|
||||||
echo "Will download and extract ${CLIENT_TAR} from ${DOWNLOAD_URL_PREFIX}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
DOWNLOAD_NODE_TAR=false
|
DOWNLOAD_NODE_TAR=false
|
||||||
if [[ -n "${NODE_TAR:-}" ]]; then
|
if [[ -n "${NODE_TAR:-}" ]]; then
|
||||||
@ -202,13 +189,6 @@ if [[ -n "${KUBERNETES_DOWNLOAD_TESTS-}" ]]; then
|
|||||||
echo "Will download and extract kubernetes-test tarball(s) from ${DOWNLOAD_URL_PREFIX}"
|
echo "Will download and extract kubernetes-test tarball(s) from ${DOWNLOAD_URL_PREFIX}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${DOWNLOAD_CLIENT_TAR}" == false && \
|
|
||||||
"${DOWNLOAD_SERVER_TAR}" == false && \
|
|
||||||
"${DOWNLOAD_TESTS_TAR}" == false ]]; then
|
|
||||||
echo "Nothing additional to download."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z "${KUBERNETES_SKIP_CONFIRM-}" ]]; then
|
if [[ -z "${KUBERNETES_SKIP_CONFIRM-}" ]]; then
|
||||||
echo "Is this ok? [Y]/n"
|
echo "Is this ok? [Y]/n"
|
||||||
read -r confirm
|
read -r confirm
|
||||||
@ -218,20 +198,16 @@ if [[ -z "${KUBERNETES_SKIP_CONFIRM-}" ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if "${DOWNLOAD_SERVER_TAR}"; then
|
download_tarball "${KUBE_ROOT}/server" "${SERVER_TAR}"
|
||||||
download_tarball "${KUBE_ROOT}/server" "${SERVER_TAR}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if "${DOWNLOAD_NODE_TAR}"; then
|
if "${DOWNLOAD_NODE_TAR}"; then
|
||||||
download_tarball "${KUBE_ROOT}/node" "${NODE_TAR}"
|
download_tarball "${KUBE_ROOT}/node" "${NODE_TAR}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if "${DOWNLOAD_CLIENT_TAR}"; then
|
download_tarball "${KUBE_ROOT}/client" "${CLIENT_TAR}"
|
||||||
download_tarball "${KUBE_ROOT}/client" "${CLIENT_TAR}"
|
extract_arch_tarball "${KUBE_ROOT}/client/${CLIENT_TAR}" "${CLIENT_PLATFORM}" "${CLIENT_ARCH}"
|
||||||
extract_arch_tarball "${KUBE_ROOT}/client/${CLIENT_TAR}" "${CLIENT_PLATFORM}" "${CLIENT_ARCH}"
|
ln -s "${KUBE_ROOT}/platforms/${CLIENT_PLATFORM}/${CLIENT_ARCH}" "${KUBE_ROOT}/client/bin"
|
||||||
ln -s "${KUBE_ROOT}/platforms/${CLIENT_PLATFORM}/${CLIENT_ARCH}" "${KUBE_ROOT}/client/bin"
|
echo "Add '${KUBE_ROOT}/client/bin' to your PATH to use newly-installed binaries."
|
||||||
echo "Add '${KUBE_ROOT}/client/bin' to your PATH to use newly-installed binaries."
|
|
||||||
fi
|
|
||||||
|
|
||||||
if "${DOWNLOAD_TESTS_TAR}"; then
|
if "${DOWNLOAD_TESTS_TAR}"; then
|
||||||
TESTS_PORTABLE_TAR="kubernetes-test-portable.tar.gz"
|
TESTS_PORTABLE_TAR="kubernetes-test-portable.tar.gz"
|
||||||
|
Loading…
Reference in New Issue
Block a user