From b23d81f825cb06464183628404a9eeed9f156d1d Mon Sep 17 00:00:00 2001 From: Hassan Zamani Date: Mon, 25 Sep 2017 14:50:24 +0330 Subject: [PATCH] Add etcd_blkio_weight var (#1690) --- roles/etcd/defaults/main.yml | 2 ++ roles/etcd/templates/etcd.j2 | 3 +++ 2 files changed, 5 insertions(+) diff --git a/roles/etcd/defaults/main.yml b/roles/etcd/defaults/main.yml index eb0cab951..7e7c5a108 100644 --- a/roles/etcd/defaults/main.yml +++ b/roles/etcd/defaults/main.yml @@ -23,6 +23,8 @@ etcd_memory_limit: 512M # Uncomment to set CPU share for etcd # etcd_cpu_limit: 300m +etcd_blkio_weight: 1000 + etcd_node_cert_hosts: "{{ groups['k8s-cluster'] | union(groups.get('calico-rr', [])) }}" etcd_compaction_retention: "8" diff --git a/roles/etcd/templates/etcd.j2 b/roles/etcd/templates/etcd.j2 index b0780573c..11f8f74e3 100644 --- a/roles/etcd/templates/etcd.j2 +++ b/roles/etcd/templates/etcd.j2 @@ -12,6 +12,9 @@ {% if etcd_cpu_limit is defined %} --cpu-shares={{ etcd_cpu_limit|regex_replace('m', '') }} \ {% endif %} + {% if etcd_blkio_weight is defined %} + --blkio-weight={{ etcd_blkio_weight }} \ + {% endif %} --name={{ etcd_member_name | default("etcd") }} \ {{ etcd_image_repo }}:{{ etcd_image_tag }} \ {% if etcd_after_v3 %}