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
7f558bae
Commit
7f558bae
authored
May 17, 2018
by
Maciej Borsz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a way to pass extra arguments to etcd.
parent
2bba0127
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
1 deletion
+8
-1
configure-helper.sh
cluster/gce/gci/configure-helper.sh
+2
-0
etcd.manifest
cluster/gce/manifests/etcd.manifest
+1
-1
util.sh
cluster/gce/util.sh
+5
-0
No files found.
cluster/gce/gci/configure-helper.sh
View file @
7f558bae
...
...
@@ -1255,6 +1255,7 @@ function prepare-etcd-manifest {
local
cluster_state
=
"new"
local
etcd_protocol
=
"http"
local
etcd_creds
=
""
local
etcd_extra_args
=
"
${
ETCD_EXTRA_ARGS
:-}
"
if
[[
-n
"
${
INITIAL_ETCD_CLUSTER_STATE
:-}
"
]]
;
then
cluster_state
=
"
${
INITIAL_ETCD_CLUSTER_STATE
}
"
...
...
@@ -1310,6 +1311,7 @@ function prepare-etcd-manifest {
fi
sed
-i
-e
"s@{{ *etcd_protocol *}}@
$etcd_protocol
@g"
"
${
temp_file
}
"
sed
-i
-e
"s@{{ *etcd_creds *}}@
$etcd_creds
@g"
"
${
temp_file
}
"
sed
-i
-e
"s@{{ *etcd_extra_args *}}@
$etcd_extra_args
@g"
"
${
temp_file
}
"
if
[[
-n
"
${
ETCD_VERSION
:-}
"
]]
;
then
sed
-i
-e
"s@{{ *pillar
\.
get('etcd_version', '
\(
.*
\)
') *}}@
${
ETCD_VERSION
}
@g"
"
${
temp_file
}
"
else
...
...
cluster/gce/manifests/etcd.manifest
View file @
7f558bae
...
...
@@ -22,7 +22,7 @@
"command": [
"/bin/sh",
"-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 }}://{{ 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"
"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 }}
{{ etcd_extra_args }}
1>>/var/log/etcd{{ suffix }}.log 2>&1"
],
"env": [
{ "name": "TARGET_STORAGE",
...
...
cluster/gce/util.sh
View file @
7f558bae
...
...
@@ -906,6 +906,11 @@ EOF
ETCD_QUOTA_BACKEND_BYTES:
$(
yaml-quote
${
ETCD_QUOTA_BACKEND_BYTES
})
EOF
fi
if
[
-n
"
${
ETCD_EXTRA_ARGS
:-}
"
]
;
then
cat
>>
$file
<<
EOF
ETCD_EXTRA_ARGS:
$(
yaml-quote
${
ETCD_EXTRA_ARGS
})
EOF
fi
if
[
-n
"
${
APISERVER_TEST_ARGS
:-}
"
]
;
then
cat
>>
$file
<<
EOF
APISERVER_TEST_ARGS:
$(
yaml-quote
${
APISERVER_TEST_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