From a3b363000de2c6b861f7116948801e8cc14c3aed Mon Sep 17 00:00:00 2001 From: Zach Loafman Date: Tue, 3 Jan 2017 13:52:02 -0800 Subject: [PATCH] Fix AWS break injected by kubernetes/kubernetes#39020 --- cluster/common.sh | 32 ++++++++++++++++++++++++++++++++ cluster/gce/util.sh | 31 ------------------------------- 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/cluster/common.sh b/cluster/common.sh index d06e40eccd3..b724835db37 100755 --- a/cluster/common.sh +++ b/cluster/common.sh @@ -852,6 +852,38 @@ function sha1sum-file() { fi } +# Downloads cfssl into ${KUBE_TEMP}/cfssl directory +# +# Assumed vars: +# KUBE_TEMP: temporary directory +# +function download-cfssl { + mkdir -p "${KUBE_TEMP}/cfssl" + pushd "${KUBE_TEMP}/cfssl" + + kernel=$(uname -s) + case "${kernel}" in + Linux) + curl -s -L -o cfssl https://pkg.cfssl.org/R1.2/cfssl_linux-amd64 + curl -s -L -o cfssljson https://pkg.cfssl.org/R1.2/cfssljson_linux-amd64 + ;; + Darwin) + curl -s -L -o cfssl https://pkg.cfssl.org/R1.2/cfssl_darwin-amd64 + curl -s -L -o cfssljson https://pkg.cfssl.org/R1.2/cfssljson_darwin-amd64 + ;; + *) + echo "Unknown, unsupported platform: ${kernel}." >&2 + echo "Supported platforms: Linux, Darwin." >&2 + exit 2 + esac + + chmod +x cfssl + chmod +x cfssljson + + popd +} + + # Create certificate pairs for the cluster. # $1: The public IP for the master. # diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index 436deb50c1d..8688f50c6d5 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -726,37 +726,6 @@ function get-master-disk-size() { fi } -# Downloads cfssl into ${KUBE_TEMP}/cfssl directory -# -# Assumed vars: -# KUBE_TEMP: temporary directory -# -function download-cfssl { - mkdir -p "${KUBE_TEMP}/cfssl" - pushd "${KUBE_TEMP}/cfssl" - - kernel=$(uname -s) - case "${kernel}" in - Linux) - curl -s -L -o cfssl https://pkg.cfssl.org/R1.2/cfssl_linux-amd64 - curl -s -L -o cfssljson https://pkg.cfssl.org/R1.2/cfssljson_linux-amd64 - ;; - Darwin) - curl -s -L -o cfssl https://pkg.cfssl.org/R1.2/cfssl_darwin-amd64 - curl -s -L -o cfssljson https://pkg.cfssl.org/R1.2/cfssljson_darwin-amd64 - ;; - *) - echo "Unknown, unsupported platform: ${kernel}." >&2 - echo "Supported platforms: Linux, Darwin." >&2 - exit 2 - esac - - chmod +x cfssl - chmod +x cfssljson - - popd -} - # Generates SSL certificates for etcd cluster. Uses cfssl program. #