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
10e423a6
Commit
10e423a6
authored
Feb 26, 2018
by
wojtekt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix regional clusters startup
parent
ab1c3dcc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
configure-helper.sh
cluster/gce/gci/configure-helper.sh
+2
-0
etcd.manifest
cluster/gce/manifests/etcd.manifest
+1
-1
No files found.
cluster/gce/gci/configure-helper.sh
View file @
10e423a6
...
@@ -1352,6 +1352,7 @@ function start-kube-proxy {
...
@@ -1352,6 +1352,7 @@ function start-kube-proxy {
# $5: pod name, which should be either etcd or etcd-events
# $5: pod name, which should be either etcd or etcd-events
function
prepare-etcd-manifest
{
function
prepare-etcd-manifest
{
local
host_name
=
${
ETCD_HOSTNAME
:-$(
hostname
-s
)}
local
host_name
=
${
ETCD_HOSTNAME
:-$(
hostname
-s
)}
local
host_ip
=
$(
python
-c
"import socket;print(socket.gethostbyname(
\"
${
host_name
}
\"
))"
)
local
etcd_cluster
=
""
local
etcd_cluster
=
""
local
cluster_state
=
"new"
local
cluster_state
=
"new"
local
etcd_protocol
=
"http"
local
etcd_protocol
=
"http"
...
@@ -1380,6 +1381,7 @@ function prepare-etcd-manifest {
...
@@ -1380,6 +1381,7 @@ function prepare-etcd-manifest {
sed
-i
-e
"s@{{ *server_port *}}@
$3
@g"
"
${
temp_file
}
"
sed
-i
-e
"s@{{ *server_port *}}@
$3
@g"
"
${
temp_file
}
"
sed
-i
-e
"s@{{ *cpulimit *}}@
\"
$4
\"
@g"
"
${
temp_file
}
"
sed
-i
-e
"s@{{ *cpulimit *}}@
\"
$4
\"
@g"
"
${
temp_file
}
"
sed
-i
-e
"s@{{ *hostname *}}@
$host_name
@g"
"
${
temp_file
}
"
sed
-i
-e
"s@{{ *hostname *}}@
$host_name
@g"
"
${
temp_file
}
"
sed
-i
-e
"s@{{ *host_ip *}}@
$host_ip
@g"
"
${
temp_file
}
"
sed
-i
-e
"s@{{ *srv_kube_path *}}@/etc/srv/kubernetes@g"
"
${
temp_file
}
"
sed
-i
-e
"s@{{ *srv_kube_path *}}@/etc/srv/kubernetes@g"
"
${
temp_file
}
"
sed
-i
-e
"s@{{ *etcd_cluster *}}@
$etcd_cluster
@g"
"
${
temp_file
}
"
sed
-i
-e
"s@{{ *etcd_cluster *}}@
$etcd_cluster
@g"
"
${
temp_file
}
"
sed
-i
-e
"s@{{ *liveness_probe_initial_delay *}}@
${
ETCD_LIVENESS_PROBE_INITIAL_DELAY_SEC
:-
15
}
@g"
"
${
temp_file
}
"
sed
-i
-e
"s@{{ *liveness_probe_initial_delay *}}@
${
ETCD_LIVENESS_PROBE_INITIAL_DELAY_SEC
:-
15
}
@g"
"
${
temp_file
}
"
...
...
cluster/gce/manifests/etcd.manifest
View file @
10e423a6
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
"command": [
"command": [
"/bin/sh",
"/bin/sh",
"-c",
"-c",
"if [ -e /usr/local/bin/migrate-if-needed.sh ]; then /usr/local/bin/migrate-if-needed.sh 1>>/var/log/etcd{{ suffix }}.log 2>&1; fi; exec /usr/local/bin/etcd --name etcd-{{ hostname }} --listen-peer-urls {{ etcd_protocol }}://
127.0.0.1
:{{ server_port }} --initial-advertise-peer-urls {{ etcd_protocol }}://{{ hostname }}:{{ server_port }} --advertise-client-urls http://127.0.0.1:{{ port }} --listen-client-urls http://127.0.0.1:{{ port }} {{ quota_bytes }} --data-dir /var/etcd/data{{ suffix }} --initial-cluster-state {{ cluster_state }} --initial-cluster {{ etcd_cluster }} {{ etcd_creds }} 1>>/var/log/etcd{{ suffix }}.log 2>&1"
"if [ -e /usr/local/bin/migrate-if-needed.sh ]; then /usr/local/bin/migrate-if-needed.sh 1>>/var/log/etcd{{ suffix }}.log 2>&1; fi; exec /usr/local/bin/etcd --name etcd-{{ hostname }} --listen-peer-urls {{ etcd_protocol }}://
{{ host_ip }}
:{{ server_port }} --initial-advertise-peer-urls {{ etcd_protocol }}://{{ hostname }}:{{ server_port }} --advertise-client-urls http://127.0.0.1:{{ port }} --listen-client-urls http://127.0.0.1:{{ port }} {{ quota_bytes }} --data-dir /var/etcd/data{{ suffix }} --initial-cluster-state {{ cluster_state }} --initial-cluster {{ etcd_cluster }} {{ etcd_creds }} 1>>/var/log/etcd{{ suffix }}.log 2>&1"
],
],
"env": [
"env": [
{ "name": "TARGET_STORAGE",
{ "name": "TARGET_STORAGE",
...
...
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