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
a2f47f5b
Commit
a2f47f5b
authored
Feb 26, 2018
by
Tim Hockin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't require release tars on kube-down
parent
368233b9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
10 deletions
+17
-10
common.sh
cluster/common.sh
+15
-10
kube-up.sh
cluster/kube-up.sh
+2
-0
No files found.
cluster/common.sh
View file @
a2f47f5b
...
@@ -453,32 +453,37 @@ EOF
...
@@ -453,32 +453,37 @@ EOF
popd
popd
}
}
# Check whether required
client and server
binaries exist, prompting to download
# Check whether required binaries exist, prompting to download
# if missing.
# if missing.
# If KUBERNETES_SKIP_CONFIRM is set to y, we'll automatically download binaries
# If KUBERNETES_SKIP_CONFIRM is set to y, we'll automatically download binaries
# without prompting.
# without prompting.
function
verify-kube-binaries
()
{
function
verify-kube-binaries
()
{
local
missing_binaries
=
false
if
!
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
version
--client
>
&/dev/null
;
then
if
!
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
version
--client
>
&/dev/null
;
then
echo
"!!! kubectl appears to be broken or missing"
echo
"!!! kubectl appears to be broken or missing"
missing_binaries
=
true
download-release-binaries
fi
if
!
$(
find-release-tars
)
;
then
missing_binaries
=
true
fi
fi
}
if
!
"
${
missing_binaries
}
"
;
then
# Check whether required release artifacts exist, prompting to download
return
# if missing.
# If KUBERNETES_SKIP_CONFIRM is set to y, we'll automatically download binaries
# without prompting.
function
verify-release-tars
()
{
if
!
$(
find-release-tars
)
;
then
download-release-binaries
fi
fi
}
# Download release artifacts.
function
download-release-binaries
()
{
get_binaries_script
=
"
${
KUBE_ROOT
}
/cluster/get-kube-binaries.sh"
get_binaries_script
=
"
${
KUBE_ROOT
}
/cluster/get-kube-binaries.sh"
local
resp
=
"y"
local
resp
=
"y"
if
[[
!
"
${
KUBERNETES_SKIP_CONFIRM
:-
n
}
"
=
~ ^[yY]
$
]]
;
then
if
[[
!
"
${
KUBERNETES_SKIP_CONFIRM
:-
n
}
"
=
~ ^[yY]
$
]]
;
then
echo
"Required
binarie
s appear to be missing. Do you wish to download them? [Y/n]"
echo
"Required
release artifact
s appear to be missing. Do you wish to download them? [Y/n]"
read
resp
read
resp
fi
fi
if
[[
"
${
resp
}
"
=
~ ^[nN]
$
]]
;
then
if
[[
"
${
resp
}
"
=
~ ^[nN]
$
]]
;
then
echo
"You must download
binarie
s to continue. You can use "
echo
"You must download
release artifact
s to continue. You can use "
echo
"
${
get_binaries_script
}
"
echo
"
${
get_binaries_script
}
"
echo
"to do this for your automatically."
echo
"to do this for your automatically."
exit
1
exit
1
...
...
cluster/kube-up.sh
View file @
a2f47f5b
...
@@ -63,6 +63,8 @@ echo "... calling verify-prereqs" >&2
...
@@ -63,6 +63,8 @@ echo "... calling verify-prereqs" >&2
verify-prereqs
verify-prereqs
echo
"... calling verify-kube-binaries"
>
&2
echo
"... calling verify-kube-binaries"
>
&2
verify-kube-binaries
verify-kube-binaries
echo
"... calling verify-release-tars"
>
&2
verify-release-tars
echo
"... calling kube-up"
>
&2
echo
"... calling kube-up"
>
&2
kube-up
kube-up
...
...
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