Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kubespray
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Kubespray
Commits
bad60769
Commit
bad60769
authored
8 years ago
by
Matthew Mosesohn
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #987 from mattymo/etcd-retune
Re-tune ETCD performance params
parents
c2bd76a2
71e14a13
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
roles/etcd/defaults/main.yml
+6
-1
6 additions, 1 deletion
roles/etcd/defaults/main.yml
roles/etcd/templates/etcd-docker.service.j2
+6
-1
6 additions, 1 deletion
roles/etcd/templates/etcd-docker.service.j2
roles/etcd/templates/etcd.j2
+2
-1
2 additions, 1 deletion
roles/etcd/templates/etcd.j2
with
14 additions
and
3 deletions
roles/etcd/defaults/main.yml
+
6
−
1
View file @
bad60769
...
...
@@ -7,6 +7,11 @@ etcd_cert_group: root
etcd_script_dir
:
"
{{
bin_dir
}}/etcd-scripts"
etcd_heartbeat_interval
:
"
250"
etcd_election_timeout
:
"
5000"
# Limits
etcd_memory_limit
:
512M
etcd_cpu_limit
:
300m
# Uncomment to set CPU share for etcd
#etcd_cpu_limit: 300m
This diff is collapsed.
Click to expand it.
roles/etcd/templates/etcd-docker.service.j2
+
6
−
1
View file @
bad60769
...
...
@@ -14,7 +14,12 @@ ExecStart={{ docker_bin_dir }}/docker run --restart=on-failure:5 \
-v /etc/ssl/certs:/etc/ssl/certs:ro \
-v {{ etcd_cert_dir }}:{{ etcd_cert_dir }}:ro \
-v /var/lib/etcd:/var/lib/etcd:rw \
--memory={{ etcd_memory_limit|regex_replace('Mi', 'M') }} --cpu-shares={{ etcd_cpu_limit|regex_replace('m', '') }} \
{% if etcd_memory_limit is defined %}
--memory={{ etcd_memory_limit|regex_replace('Mi', 'M') }} \
{% endif %}
{% if etcd_cpu_limit is defined %}
--cpu-shares={{ etcd_cpu_limit|regex_replace('m', '') }} \
{% endif %}
--name={{ etcd_member_name | default("etcd") }} \
{{ etcd_image_repo }}:{{ etcd_image_tag }} \
{% if etcd_after_v3 %}
...
...
This diff is collapsed.
Click to expand it.
roles/etcd/templates/etcd.j2
+
2
−
1
View file @
bad60769
...
...
@@ -4,7 +4,8 @@ ETCD_INITIAL_ADVERTISE_PEER_URLS={{ etcd_peer_url }}
ETCD_INITIAL_CLUSTER_STATE={% if etcd_cluster_is_healthy.rc != 0 | bool %}new{% else %}existing{% endif %}
ETCD_LISTEN_CLIENT_URLS=https://{{ etcd_address }}:2379,https://127.0.0.1:2379
ETCD_ELECTION_TIMEOUT=10000
ETCD_ELECTION_TIMEOUT={{ etcd_election_timeout }}
ETCD_HEARTBEAT_INTERVAL={{ etcd_heartbeat_interval }}
ETCD_INITIAL_CLUSTER_TOKEN=k8s_etcd
ETCD_LISTEN_PEER_URLS=https://{{ etcd_address }}:2380
ETCD_NAME={{ etcd_member_name }}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment