From aeb1186a665ce6d1619635b236b77b5f9b87be08 Mon Sep 17 00:00:00 2001 From: Ruslan Aliev Date: Wed, 17 Apr 2024 23:47:04 -0500 Subject: [PATCH] Add configurable ETCD parameters to aux cluster Signed-off-by: Ruslan Aliev Change-Id: I77373c223c6ea723ee31fe51e6fb4a9e84be03f7 --- promenade/schemas/Genesis.yaml | 10 ++++++++++ .../include/genesis-etcd/server-container.yaml | 10 ++++++++++ tests/unit/builder_data/simple/Genesis.yaml | 7 +++++++ tools/gate/config-templates/genesis-config.yaml | 7 +++++++ 4 files changed, 34 insertions(+) diff --git a/promenade/schemas/Genesis.yaml b/promenade/schemas/Genesis.yaml index ecd0de28..8df1f9d4 100644 --- a/promenade/schemas/Genesis.yaml +++ b/promenade/schemas/Genesis.yaml @@ -111,6 +111,16 @@ data: # before the auxiliary members will self-terminate auxiliary_threshold: type: integer + heartbeat_interval: + type: integer + election_timeout: + type: integer + snapshot_count: + type: integer + cipher_suites: + type: string + gomaxprocs: + type: integer additionalProperties: false files: diff --git a/promenade/templates/include/genesis-etcd/server-container.yaml b/promenade/templates/include/genesis-etcd/server-container.yaml index d8d2fbbb..2a119b3b 100644 --- a/promenade/templates/include/genesis-etcd/server-container.yaml +++ b/promenade/templates/include/genesis-etcd/server-container.yaml @@ -53,6 +53,16 @@ value: $(ETCD_CERT_FILE) - name: ETCDCTL_KEY value: $(ETCD_KEY_FILE) + - name: ETCD_HEARTBEAT_INTERVAL + value: {{ config['Genesis:etcd.heartbeat_interval'] }} + - name: ETCD_ELECTION_TIMEOUT + value: {{ config['Genesis:etcd.election_timeout'] }} + - name: ETCD_SNAPSHOT_COUNT + value: {{ config['Genesis:etcd.election_timeout'] }} + - name: ETCD_CIPHER_SUITES + value: {{ config['Genesis:etcd.cipher_suites'] }} + - name: GOMAXPROCS + value: {{ config['Genesis:etcd.gomaxprocs'] }} ports: - name: client containerPort: {{ client_port }} diff --git a/tests/unit/builder_data/simple/Genesis.yaml b/tests/unit/builder_data/simple/Genesis.yaml index bbaffc1b..c0894577 100644 --- a/tests/unit/builder_data/simple/Genesis.yaml +++ b/tests/unit/builder_data/simple/Genesis.yaml @@ -38,6 +38,13 @@ data: etcd: quay.io/coreos/etcd:v3.5.11 etcdctl: quay.io/airshipit/porthole-etcdctl-utility:latest-ubuntu_focal scheduler: registry.k8s.io/kube-scheduler-amd64:v1.29.2 + etcd: + heartbeat_interval: 100 + election_timeout: 1000 + snapshot_count: 5000 + cipher_suites: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 + gomaxprocs: 20 + files: - path: /var/lib/anchor/calico-etcd-bootstrap content: "# placeholder for triggering calico etcd bootstrapping" diff --git a/tools/gate/config-templates/genesis-config.yaml b/tools/gate/config-templates/genesis-config.yaml index e42fee13..296adb91 100644 --- a/tools/gate/config-templates/genesis-config.yaml +++ b/tools/gate/config-templates/genesis-config.yaml @@ -38,6 +38,13 @@ data: etcdctl: ${IMAGE_ETCDCTL} scheduler: ${IMAGE_SCHEDULER} enable_operator: false + etcd: + auxiliary_threshold: 3 + heartbeat_interval: 100 + election_timeout: 1000 + snapshot_count: 5000 + cipher_suites: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA + gomaxprocs: 20 files: - path: /var/lib/anchor/calico-etcd-bootstrap content: ""