mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-06 03:33:26 +00:00
Exit gce kube-up.sh early if openssl is LibreSSL
macOS has an openssl binary, but it's actually LibreSSL, which doesn't play well with the easyrsa script that cluster/gce/util.sh uses to generate certs Instead of waiting until we generate certs to discover easyrsa doesn't work, consider openssl a prereq for gce, and include a check for the version string starting with OpenSSL Also, mirror kube-up.sh's "... calling" output in kube-down.sh
This commit is contained in:
@@ -539,7 +539,14 @@ function kube::util::test_openssl_installed {
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Failed to run openssl. Please ensure openssl is installed"
|
||||
exit 1
|
||||
elif [ "$(openssl version | cut -d\ -f1)" == "LibreSSL" ]; then
|
||||
echo "LibreSSL is not supported. Please ensure openssl points to an OpenSSL binary"
|
||||
if [ "$(uname -s)" == "Darwin" ]; then
|
||||
echo 'On macOS we recommend using homebrew and adding "$(brew --prefix openssl)/bin" to your PATH'
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OPENSSL_BIN=$(command -v openssl)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user