Merge "kube.sh: don't download kubectl again when it exists"

This commit is contained in:
Zuul 2018-02-23 10:50:51 +00:00 committed by Gerrit Code Review
commit 6167144628
1 changed files with 5 additions and 3 deletions

View File

@ -107,9 +107,11 @@ function kubeadm_aio_reqs_install {
# Install docker and kubectl
TMP_DIR=$(mktemp -d)
curl -sSL https://storage.googleapis.com/kubernetes-release/release/${KUBE_VERSION}/bin/linux/amd64/kubectl -o ${TMP_DIR}/kubectl
chmod +x ${TMP_DIR}/kubectl
sudo mv ${TMP_DIR}/kubectl /usr/local/bin/kubectl
if [ ! -x /usr/local/bin/kubectl ]; then
curl -sSL https://storage.googleapis.com/kubernetes-release/release/${KUBE_VERSION}/bin/linux/amd64/kubectl -o ${TMP_DIR}/kubectl
chmod +x ${TMP_DIR}/kubectl
sudo mv ${TMP_DIR}/kubectl /usr/local/bin/kubectl
fi
if [ "$GET_DOCKER" == "True" ]; then
curl -fsSL get.docker.com -o ${TMP_DIR}/get-docker.sh