This commit is contained in:
Zach Loafman 2017-01-03 13:52:02 -08:00
parent 7f9056dd07
commit a3b363000d
2 changed files with 32 additions and 31 deletions

View File

@ -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.
#

View File

@ -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.
#