diff --git a/inventory/group_vars/all.yml b/inventory/group_vars/all.yml index a30055367..21b81a6de 100644 --- a/inventory/group_vars/all.yml +++ b/inventory/group_vars/all.yml @@ -98,3 +98,6 @@ bin_dir: /usr/local/bin ## Please specify true if you want to perform a kernel upgrade kernel_upgrade: false + +## Etcd auto compaction retention for mvcc key value store in hour +#etcd_compaction_retention: 0 diff --git a/roles/etcd/defaults/main.yml b/roles/etcd/defaults/main.yml index 8fd72f3db..06714cd90 100644 --- a/roles/etcd/defaults/main.yml +++ b/roles/etcd/defaults/main.yml @@ -22,3 +22,5 @@ etcd_memory_limit: 512M #etcd_cpu_limit: 300m etcd_node_cert_hosts: "{{ groups['k8s-cluster'] | union(groups.get('calico-rr', [])) }}" + +etcd_compaction_retention: "0" diff --git a/roles/etcd/templates/etcd.env.yml b/roles/etcd/templates/etcd.env.yml index 07e200e03..115aa14b5 100644 --- a/roles/etcd/templates/etcd.env.yml +++ b/roles/etcd/templates/etcd.env.yml @@ -11,6 +11,7 @@ ETCD_LISTEN_PEER_URLS=https://{{ etcd_address }}:2380 ETCD_NAME={{ etcd_member_name }} ETCD_PROXY=off ETCD_INITIAL_CLUSTER={{ etcd_peer_addresses }} +ETCD_AUTO_COMPACTION_RETENTION={{ etcd_compaction_retention }} # TLS settings ETCD_TRUSTED_CA_FILE={{ etcd_cert_dir }}/ca.pem