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
04241a67
Commit
04241a67
authored
Apr 12, 2017
by
Matthew Wong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do etcd semver validation using posix only
parent
c7b0ec01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
etcd.sh
hack/lib/etcd.sh
+6
-2
No files found.
hack/lib/etcd.sh
View file @
04241a67
...
@@ -36,12 +36,12 @@ kube::etcd::validate() {
...
@@ -36,12 +36,12 @@ kube::etcd::validate() {
# validate installed version is at least equal to minimum
# validate installed version is at least equal to minimum
version
=
$(
etcd
--version
|
tail
-n
+1 |
head
-n
1 |
cut
-d
" "
-f
3
)
version
=
$(
etcd
--version
|
tail
-n
+1 |
head
-n
1 |
cut
-d
" "
-f
3
)
if
[[
"
`
echo
-e
"
${
version
}
\n
${
ETCD_VERSION
}
"
|
sort
-rV
|
head
-n
1
`
"
!=
"
$version
"
]]
;
then
if
[[
$(
kube::etcd::version
$ETCD_VERSION
)
-gt
$(
kube::etcd::version
$version
)
]]
;
then
export
PATH
=
$KUBE_ROOT
/third_party/etcd:
$PATH
export
PATH
=
$KUBE_ROOT
/third_party/etcd:
$PATH
hash
etcd
hash
etcd
echo
$PATH
echo
$PATH
version
=
$(
etcd
--version
|
head
-n
1 |
cut
-d
" "
-f
3
)
version
=
$(
etcd
--version
|
head
-n
1 |
cut
-d
" "
-f
3
)
if
[[
"
`
echo
-e
"
${
version
}
\n
${
ETCD_VERSION
}
"
|
sort
-rV
|
head
-n
1
`
"
!=
"
$version
"
]]
;
then
if
[[
$(
kube::etcd::version
$ETCD_VERSION
)
-gt
$(
kube::etcd::version
$version
)
]]
;
then
kube::log::usage
"etcd version
${
ETCD_VERSION
}
or greater required."
kube::log::usage
"etcd version
${
ETCD_VERSION
}
or greater required."
kube::log::info
"You can use 'hack/install-etcd.sh' to install a copy in third_party/."
kube::log::info
"You can use 'hack/install-etcd.sh' to install a copy in third_party/."
exit
1
exit
1
...
@@ -49,6 +49,10 @@ kube::etcd::validate() {
...
@@ -49,6 +49,10 @@ kube::etcd::validate() {
fi
fi
}
}
kube::etcd::version
()
{
printf
'%s\n'
"
${
@
}
"
|
awk
-F
.
'{ printf("%d%03d%03d\n", $1, $2, $3) }'
}
kube::etcd::start
()
{
kube::etcd::start
()
{
# validate before running
# validate before running
kube::etcd::validate
kube::etcd::validate
...
...
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