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
dd203087
Commit
dd203087
authored
May 09, 2016
by
Ovidiu Predescu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Automatically download the latest stable release version of
Kubernetes. Echo error to stderr. Simplify expression for KUBE_VERSION. Explicitly match beginning of string.
parent
8a81000b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
get-kube.sh
cluster/get-kube.sh
+1
-1
download-release.sh
cluster/ubuntu/download-release.sh
+15
-2
No files found.
cluster/get-kube.sh
View file @
dd203087
...
...
@@ -72,7 +72,7 @@ function get_latest_version_number {
elif
[[
$(
which curl
)
]]
;
then
curl
-Ss
${
latest_url
}
else
echo
"Couldn't find curl or wget. Bailing out."
echo
"Couldn't find curl or wget. Bailing out."
>
&2
exit
4
fi
}
...
...
cluster/ubuntu/download-release.sh
View file @
dd203087
...
...
@@ -42,7 +42,7 @@ grep -q "^${FLANNEL_VERSION}\$" binaries/.flannel 2>/dev/null || {
}
# ectd
ETCD_VERSION
=
${
ETCD_VERSION
:-
"2.
2
.1"
}
ETCD_VERSION
=
${
ETCD_VERSION
:-
"2.
3
.1"
}
ETCD
=
"etcd-v
${
ETCD_VERSION
}
-linux-amd64"
echo
"Prepare etcd
${
ETCD_VERSION
}
release ..."
grep
-q
"^
${
ETCD_VERSION
}
\$
"
binaries/.etcd 2>/dev/null
||
{
...
...
@@ -52,8 +52,21 @@ grep -q "^${ETCD_VERSION}\$" binaries/.etcd 2>/dev/null || {
echo
${
ETCD_VERSION
}
>
binaries/.etcd
}
function
get_latest_version_number
{
local
-r
latest_url
=
"https://storage.googleapis.com/kubernetes-release/release/stable.txt"
if
[[
$(
which wget
)
]]
;
then
wget
-qO-
${
latest_url
}
elif
[[
$(
which curl
)
]]
;
then
curl
-Ss
${
latest_url
}
else
echo
"Couldn't find curl or wget. Bailing out."
>
&2
exit
4
fi
}
KUBE_VERSION
=
$(
get_latest_version_number |
sed
's/^v//'
)
# k8s
KUBE_VERSION
=
${
KUBE_VERSION
:-
"1.2.0"
}
echo
"Prepare kubernetes
${
KUBE_VERSION
}
release ..."
grep
-q
"^
${
KUBE_VERSION
}
\$
"
binaries/.kubernetes 2>/dev/null
||
{
curl
-L
https://github.com/kubernetes/kubernetes/releases/download/v
${
KUBE_VERSION
}
/kubernetes.tar.gz
-o
kubernetes.tar.gz
...
...
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