From 057ce50ace764c353ca1a90f270df4bf9b23bb64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Valais?= Date: Fri, 25 Mar 2022 18:24:36 +0100 Subject: [PATCH] make/cluster.sh: speedup etcd by using --unsafe-no-fsync MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using --unsafe-no-fsync is OK for development deployments of etcd [1]. etcd relies on fsync for its consensus protocol. [1]: https://github.com/etcd-io/etcd/pull/11946 [2]: https://etcd.io/docs/v3.5/tuning/#disk [3]: https://etcd.io/docs/v3.5/faq/ Signed-off-by: Maƫl Valais Co-authored-by: Tim Ramlot <42113979+inteon@users.noreply.github.com> --- make/config/kind/v1beta2.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/make/config/kind/v1beta2.yaml b/make/config/kind/v1beta2.yaml index a7e034cf8..bff6c66ba 100644 --- a/make/config/kind/v1beta2.yaml +++ b/make/config/kind/v1beta2.yaml @@ -2,7 +2,16 @@ # service cidr range to be 10.0.0.0/16. # we do this because we need a fixed/predictable clusterIP of 10.0.0.15 for the # nginx-ingress service, in order to perform HTTP01 validations during tests. - +# +# The --unsafe-no-fsync decreases the load on the pod's filesystem [1], +# which in turn decreases the end-to-end tests duration. It is OK for us to +# use this flag because we are using a one-node etcd cluster. The fsync +# feature is used for the raft consensus protocol and is thus only useful +# when using 3 or more etcd nodes. +# +# [1]: https://github.com/etcd-io/etcd/pull/11946 +# [2]: https://etcd.io/docs/v3.5/tuning/#disk +# [3]: https://etcd.io/docs/v3.5/faq/ apiVersion: kind.x-k8s.io/v1alpha4 kind: Cluster kubeadmConfigPatches: @@ -13,5 +22,9 @@ kubeadmConfigPatches: name: config networking: serviceSubnet: 10.0.0.0/16 + etcd: + local: + extraArgs: + unsafe-no-fsync: "True" nodes: - role: control-plane