mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Merge pull request #22779 from justinsb/fix_21218
Auto commit by PR queue bot
This commit is contained in:
commit
fc40fad0b2
@ -49,24 +49,51 @@ MASTER_DISK_ID=
|
||||
# Well known tags
|
||||
TAG_KEY_MASTER_IP="kubernetes.io/master-ip"
|
||||
|
||||
# Defaults: ubuntu -> wily
|
||||
if [[ "${KUBE_OS_DISTRIBUTION}" == "ubuntu" ]]; then
|
||||
KUBE_OS_DISTRIBUTION=wily
|
||||
fi
|
||||
|
||||
# For GCE script compatibility
|
||||
OS_DISTRIBUTION=${KUBE_OS_DISTRIBUTION}
|
||||
|
||||
case "${KUBE_OS_DISTRIBUTION}" in
|
||||
trusty|wheezy|jessie|vivid|wily|coreos)
|
||||
source "${KUBE_ROOT}/cluster/aws/${KUBE_OS_DISTRIBUTION}/util.sh"
|
||||
# Defaults: ubuntu -> wily
|
||||
if [[ "${OS_DISTRIBUTION}" == "ubuntu" ]]; then
|
||||
OS_DISTRIBUTION=wily
|
||||
fi
|
||||
|
||||
# Loads the distro-specific utils script.
|
||||
# If the distro is not recommended, prints warnings or exits.
|
||||
function load_distro_utils () {
|
||||
case "${OS_DISTRIBUTION}" in
|
||||
jessie)
|
||||
;;
|
||||
wily)
|
||||
;;
|
||||
vivid)
|
||||
echo "vivid is currently end-of-life and does not get updates." >&2
|
||||
echo "Please consider using wily or jessie instead" >&2
|
||||
echo "(will continue in 10 seconds)" >&2
|
||||
sleep 10
|
||||
;;
|
||||
coreos)
|
||||
echo "coreos is no longer supported by kube-up; please use jessie instead" >&2
|
||||
exit 2
|
||||
;;
|
||||
trusty)
|
||||
echo "trusty is no longer supported by kube-up; please use jessie or wily instead" >&2
|
||||
exit 2
|
||||
;;
|
||||
wheezy)
|
||||
echo "wheezy is no longer supported by kube-up; please use jessie instead" >&2
|
||||
exit 2
|
||||
;;
|
||||
*)
|
||||
echo "Cannot start cluster using os distro: ${KUBE_OS_DISTRIBUTION}" >&2
|
||||
echo "Cannot start cluster using os distro: ${OS_DISTRIBUTION}" >&2
|
||||
echo "The current recommended distro is jessie" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
source "${KUBE_ROOT}/cluster/aws/${OS_DISTRIBUTION}/util.sh"
|
||||
}
|
||||
|
||||
load_distro_utils
|
||||
|
||||
# This removes the final character in bash (somehow)
|
||||
AWS_REGION=${ZONE%?}
|
||||
|
||||
@ -276,7 +303,7 @@ function detect-security-groups {
|
||||
# Vars set:
|
||||
# AWS_IMAGE
|
||||
function detect-image () {
|
||||
case "${KUBE_OS_DISTRIBUTION}" in
|
||||
case "${OS_DISTRIBUTION}" in
|
||||
trusty|coreos)
|
||||
detect-trusty-image
|
||||
;;
|
||||
@ -293,7 +320,7 @@ case "${KUBE_OS_DISTRIBUTION}" in
|
||||
detect-jessie-image
|
||||
;;
|
||||
*)
|
||||
echo "Please specify AWS_IMAGE directly (distro ${KUBE_OS_DISTRIBUTION} not recognized)"
|
||||
echo "Please specify AWS_IMAGE directly (distro ${OS_DISTRIBUTION} not recognized)"
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
@ -850,7 +877,7 @@ function subnet-setup {
|
||||
}
|
||||
|
||||
function kube-up {
|
||||
echo "Starting cluster using os distro: ${KUBE_OS_DISTRIBUTION}" >&2
|
||||
echo "Starting cluster using os distro: ${OS_DISTRIBUTION}" >&2
|
||||
|
||||
get-tokens
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user