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
449f9d91
Commit
449f9d91
authored
Feb 04, 2015
by
Clayton Coleman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make hack/local-up-cluster.sh work again for etcd 2
parent
0307d7ba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
11 deletions
+7
-11
etcd.sh
hack/lib/etcd.sh
+6
-10
local-up-cluster.sh
hack/local-up-cluster.sh
+1
-1
No files found.
hack/lib/etcd.sh
View file @
449f9d91
...
...
@@ -19,6 +19,7 @@
kube::etcd::start
()
{
local
host
=
${
ETCD_HOST
:-
127
.0.0.1
}
local
port
=
${
ETCD_PORT
:-
4001
}
local
testhost
=
${
ETCD_PUBLIC_HOST
:-
localhost
}
which etcd
>
/dev/null
||
{
kube::log::usage
"etcd must be in your PATH"
...
...
@@ -38,18 +39,13 @@ kube::etcd::start() {
# Start etcd
ETCD_DIR
=
$(
mktemp
-d
-t
test-etcd.XXXXXX
)
kube::log::usage
"etcd -data-dir
${
ETCD_DIR
}
-addr
${
host
}
:
${
port
}
>/dev/null 2>/dev/null"
kube::log::usage
"etcd -data-dir
${
ETCD_DIR
}
-
-bind-
addr
${
host
}
:
${
port
}
>/dev/null 2>/dev/null"
etcd
-data-dir
${
ETCD_DIR
}
-addr
${
host
}
:
${
port
}
>
/dev/null 2>/dev/null &
ETCD_PID
=
$!
echo
"Waiting for etcd to come up."
while
true
;
do
if
curl
-L
http://127.0.0.1:4001/v2/keys/test
-XPUT
-d
value
=
"test"
;
then
break
fi
done
kube::util::wait_for_url
"http://
${
host
}
:
${
port
}
/v2/keys/test"
"etcd: "
echo
"Waiting for etcd to come up."
kube::util::wait_for_url
"http://
${
testhost
}
:
${
port
}
/v2/machines"
"etcd: "
0.25 80
curl
-X
PUT
"http://
${
testhost
}
:
${
port
}
/v2/keys/_test"
}
kube::etcd::cleanup
()
{
...
...
hack/local-up-cluster.sh
View file @
449f9d91
...
...
@@ -93,7 +93,7 @@ sudo "${GO_OUT}/kube-apiserver" \
--address
=
"
${
API_HOST
}
"
\
--port
=
"
${
API_PORT
}
"
\
--runtime_config
=
api/v1beta3
\
--etcd_servers
=
"http://
127.0.0.1
:4001"
\
--etcd_servers
=
"http://
localhost
:4001"
\
--portal_net
=
"10.0.0.0/24"
\
--cors_allowed_origins
=
"
${
API_CORS_ALLOWED_ORIGINS
}
"
>
"
${
APISERVER_LOG
}
"
2>&1 &
APISERVER_PID
=
$!
...
...
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