From c164b49befa86f71caaeac1baa4e6bfa5928a25d Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Sun, 30 Dec 2018 19:05:44 +0530 Subject: [PATCH] Add gcs-etcd: etcd disk space and compaction tunables Fixes: #15 Signed-off-by: Atin Mukherjee --- .../gcs-manifests/gcs-etcd-cluster.yml.j2 | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/deploy/templates/gcs-manifests/gcs-etcd-cluster.yml.j2 b/deploy/templates/gcs-manifests/gcs-etcd-cluster.yml.j2 index c02c250..1cb092a 100644 --- a/deploy/templates/gcs-manifests/gcs-etcd-cluster.yml.j2 +++ b/deploy/templates/gcs-manifests/gcs-etcd-cluster.yml.j2 @@ -9,6 +9,29 @@ metadata: app.kubernetes.io/component: etcd app.kubernetes.io/name: etcd-cluster spec: + pod: + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: etcd_cluster + operator: In + values: + - etcd + topologyKey: kubernetes.io/hostname + etcdEnv: + # https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/maintenance.md#auto-compaction + - name: ETCD_AUTO_COMPACTION_MODE + value: "periodic" + - name: ETCD_AUTO_COMPACTION_RETENTION + value: "5m" + - name: ETCD_SNAPSHOT_COUNT + value: "10000" + - name: ETCD_QUOTA_BACKEND_BYTES + value: "8589934592" # 8 * 1024 * 1024 * 1024 = 8GiB size: 3 version: 3.3.8