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
bd371007
Commit
bd371007
authored
May 27, 2016
by
André Martins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more global env vars to local-up-cluster.sh
Signed-off-by:
André Martins
<
aanm90@gmail.com
>
parent
b61ce0bc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
etcd.sh
hack/lib/etcd.sh
+6
-7
local-up-cluster.sh
hack/local-up-cluster.sh
+3
-2
No files found.
hack/lib/etcd.sh
View file @
bd371007
...
@@ -17,11 +17,10 @@
...
@@ -17,11 +17,10 @@
# A set of helpers for starting/running etcd for tests
# A set of helpers for starting/running etcd for tests
ETCD_VERSION
=
${
ETCD_VERSION
:-
2
.2.1
}
ETCD_VERSION
=
${
ETCD_VERSION
:-
2
.2.1
}
ETCD_HOST
=
${
ETCD_HOST
:-
127
.0.0.1
}
ETCD_PORT
=
${
ETCD_PORT
:-
4001
}
kube::etcd::start
()
{
kube::etcd::start
()
{
local
host
=
${
ETCD_HOST
:-
127
.0.0.1
}
local
port
=
${
ETCD_PORT
:-
4001
}
which etcd
>
/dev/null
||
{
which etcd
>
/dev/null
||
{
kube::log::usage
"etcd must be in your PATH"
kube::log::usage
"etcd must be in your PATH"
exit
1
exit
1
...
@@ -42,13 +41,13 @@ kube::etcd::start() {
...
@@ -42,13 +41,13 @@ kube::etcd::start() {
# Start etcd
# Start etcd
ETCD_DIR
=
$(
mktemp
-d
2>/dev/null
||
mktemp
-d
-t
test-etcd.XXXXXX
)
ETCD_DIR
=
$(
mktemp
-d
2>/dev/null
||
mktemp
-d
-t
test-etcd.XXXXXX
)
kube::log::info
"etcd -data-dir
${
ETCD_DIR
}
--bind-addr
${
host
}
:
${
port
}
>/dev/null 2>/dev/null"
kube::log::info
"etcd -data-dir
${
ETCD_DIR
}
--bind-addr
${
ETCD_HOST
}
:
${
ETCD_PORT
}
>/dev/null 2>/dev/null"
etcd
-data-dir
${
ETCD_DIR
}
--bind-addr
${
host
}
:
${
port
}
>
/dev/null 2>/dev/null &
etcd
-data-dir
${
ETCD_DIR
}
--bind-addr
${
ETCD_HOST
}
:
${
ETCD_PORT
}
>
/dev/null 2>/dev/null &
ETCD_PID
=
$!
ETCD_PID
=
$!
echo
"Waiting for etcd to come up."
echo
"Waiting for etcd to come up."
kube::util::wait_for_url
"http://
${
host
}
:
${
port
}
/v2/machines"
"etcd: "
0.25 80
kube::util::wait_for_url
"http://
${
ETCD_HOST
}
:
${
ETCD_PORT
}
/v2/machines"
"etcd: "
0.25 80
curl
-fs
-X
PUT
"http://
${
host
}
:
${
port
}
/v2/keys/_test"
curl
-fs
-X
PUT
"http://
${
ETCD_HOST
}
:
${
ETCD_PORT
}
/v2/keys/_test"
}
}
kube::etcd::stop
()
{
kube::etcd::stop
()
{
...
...
hack/local-up-cluster.sh
View file @
bd371007
...
@@ -105,6 +105,7 @@ set +e
...
@@ -105,6 +105,7 @@ set +e
API_PORT
=
${
API_PORT
:-
8080
}
API_PORT
=
${
API_PORT
:-
8080
}
API_HOST
=
${
API_HOST
:-
127
.0.0.1
}
API_HOST
=
${
API_HOST
:-
127
.0.0.1
}
KUBELET_HOST
=
${
KUBELET_HOST
:-
"127.0.0.1"
}
# By default only allow CORS for requests on localhost
# By default only allow CORS for requests on localhost
API_CORS_ALLOWED_ORIGINS
=
${
API_CORS_ALLOWED_ORIGINS
:-
"/127.0.0.1(:[0-9]+)?
$,
/localhost(:[0-9]+)?$"
}
API_CORS_ALLOWED_ORIGINS
=
${
API_CORS_ALLOWED_ORIGINS
:-
"/127.0.0.1(:[0-9]+)?
$,
/localhost(:[0-9]+)?$"
}
KUBELET_PORT
=
${
KUBELET_PORT
:-
10250
}
KUBELET_PORT
=
${
KUBELET_PORT
:-
10250
}
...
@@ -277,7 +278,7 @@ function start_apiserver {
...
@@ -277,7 +278,7 @@ function start_apiserver {
--insecure-bind-address
=
"
${
API_HOST
}
"
\
--insecure-bind-address
=
"
${
API_HOST
}
"
\
--insecure-port
=
"
${
API_PORT
}
"
\
--insecure-port
=
"
${
API_PORT
}
"
\
--advertise-address
=
"
${
API_HOST
}
"
\
--advertise-address
=
"
${
API_HOST
}
"
\
--etcd-servers
=
"http://
127.0.0.1:4001
"
\
--etcd-servers
=
"http://
${
ETCD_HOST
}
:
${
ETCD_PORT
}
"
\
--service-cluster-ip-range
=
"10.0.0.0/24"
\
--service-cluster-ip-range
=
"10.0.0.0/24"
\
--cloud-provider
=
"
${
CLOUD_PROVIDER
}
"
\
--cloud-provider
=
"
${
CLOUD_PROVIDER
}
"
\
--cors-allowed-origins
=
"
${
API_CORS_ALLOWED_ORIGINS
}
"
>
"
${
APISERVER_LOG
}
"
2>&1 &
--cors-allowed-origins
=
"
${
API_CORS_ALLOWED_ORIGINS
}
"
>
"
${
APISERVER_LOG
}
"
2>&1 &
...
@@ -352,7 +353,7 @@ function start_kubelet {
...
@@ -352,7 +353,7 @@ function start_kubelet {
--rkt-stage1-image
=
"
${
RKT_STAGE1_IMAGE
}
"
\
--rkt-stage1-image
=
"
${
RKT_STAGE1_IMAGE
}
"
\
--hostname-override
=
"
${
HOSTNAME_OVERRIDE
}
"
\
--hostname-override
=
"
${
HOSTNAME_OVERRIDE
}
"
\
--cloud-provider
=
"
${
CLOUD_PROVIDER
}
"
\
--cloud-provider
=
"
${
CLOUD_PROVIDER
}
"
\
--address
=
"
127.0.0.1
"
\
--address
=
"
${
KUBELET_HOST
}
"
\
--api-servers
=
"
${
API_HOST
}
:
${
API_PORT
}
"
\
--api-servers
=
"
${
API_HOST
}
:
${
API_PORT
}
"
\
--cpu-cfs-quota
=
${
CPU_CFS_QUOTA
}
\
--cpu-cfs-quota
=
${
CPU_CFS_QUOTA
}
\
${
dns_args
}
\
${
dns_args
}
\
...
...
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