Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
fc40fad0
Commit
fc40fad0
authored
Mar 11, 2016
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #22779 from justinsb/fix_21218
Auto commit by PR queue bot
parents
5f5ac279
562f7f1f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
12 deletions
+39
-12
util.sh
cluster/aws/util.sh
+39
-12
No files found.
cluster/aws/util.sh
View file @
fc40fad0
...
@@ -49,24 +49,51 @@ MASTER_DISK_ID=
...
@@ -49,24 +49,51 @@ MASTER_DISK_ID=
# Well known tags
# Well known tags
TAG_KEY_MASTER_IP
=
"kubernetes.io/master-ip"
TAG_KEY_MASTER_IP
=
"kubernetes.io/master-ip"
OS_DISTRIBUTION
=
${
KUBE_OS_DISTRIBUTION
}
# Defaults: ubuntu -> wily
# Defaults: ubuntu -> wily
if
[[
"
${
KUBE_
OS_DISTRIBUTION
}
"
==
"ubuntu"
]]
;
then
if
[[
"
${
OS_DISTRIBUTION
}
"
==
"ubuntu"
]]
;
then
KUBE_
OS_DISTRIBUTION
=
wily
OS_DISTRIBUTION
=
wily
fi
fi
# For GCE script compatibility
# Loads the distro-specific utils script.
OS_DISTRIBUTION
=
${
KUBE_OS_DISTRIBUTION
}
# If the distro is not recommended, prints warnings or exits.
function
load_distro_utils
()
{
case
"
${
KUBE_OS_DISTRIBUTION
}
"
in
case
"
${
OS_DISTRIBUTION
}
"
in
trusty|wheezy|jessie|vivid|wily|coreos
)
jessie
)
source
"
${
KUBE_ROOT
}
/cluster/aws/
${
KUBE_OS_DISTRIBUTION
}
/util.sh"
;;
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
exit
2
;;
;;
esac
esac
source
"
${
KUBE_ROOT
}
/cluster/aws/
${
OS_DISTRIBUTION
}
/util.sh"
}
load_distro_utils
# This removes the final character in bash (somehow)
# This removes the final character in bash (somehow)
AWS_REGION
=
${
ZONE
%?
}
AWS_REGION
=
${
ZONE
%?
}
...
@@ -276,7 +303,7 @@ function detect-security-groups {
...
@@ -276,7 +303,7 @@ function detect-security-groups {
# Vars set:
# Vars set:
# AWS_IMAGE
# AWS_IMAGE
function
detect-image
()
{
function
detect-image
()
{
case
"
${
KUBE_
OS_DISTRIBUTION
}
"
in
case
"
${
OS_DISTRIBUTION
}
"
in
trusty|coreos
)
trusty|coreos
)
detect-trusty-image
detect-trusty-image
;;
;;
...
@@ -293,7 +320,7 @@ case "${KUBE_OS_DISTRIBUTION}" in
...
@@ -293,7 +320,7 @@ case "${KUBE_OS_DISTRIBUTION}" in
detect-jessie-image
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
exit
2
;;
;;
esac
esac
...
@@ -850,7 +877,7 @@ function subnet-setup {
...
@@ -850,7 +877,7 @@ function subnet-setup {
}
}
function
kube-up
{
function
kube-up
{
echo
"Starting cluster using os distro:
${
KUBE_
OS_DISTRIBUTION
}
"
>
&2
echo
"Starting cluster using os distro:
${
OS_DISTRIBUTION
}
"
>
&2
get-tokens
get-tokens
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment