Skip to content

Commit

Permalink
make/cluster.sh: speedup etcd by using --unsafe-no-fsync
Browse files Browse the repository at this point in the history
Using --unsafe-no-fsync is OK for development deployments of etcd [1].
etcd relies on fsync for its consensus protocol.

 [1]: etcd-io/etcd#11946
 [2]: https://etcd.io/docs/v3.5/tuning/#disk
 [3]: https://etcd.io/docs/v3.5/faq/

Signed-off-by: Maël Valais <mael@vls.dev>
Co-authored-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
  • Loading branch information
maelvls and inteon committed Mar 29, 2022
1 parent 8b95a13 commit 057ce50
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion make/config/kind/v1beta2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

0 comments on commit 057ce50

Please sign in to comment.