mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +00:00
Merge pull request #39390 from zmerlynn/fix-aws-certs
Automatic merge from submit-queue (batch tested with PRs 39280, 37350, 39389, 39390, 39313) Fix AWS break injected by #39020 Shuffle the `download-cfssl` to `cluster/common.sh` (broken in #39020)
This commit is contained in:
commit
834dda0342
@ -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.
|
||||
#
|
||||
|
@ -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.
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user