From 0d43d07ad4d057bc717afde508090d3381fbaf2f Mon Sep 17 00:00:00 2001 From: Ruakij Date: Wed, 5 Apr 2023 14:12:56 +0200 Subject: [PATCH] Add extra-config option --- kubernetes/defaults/main.yml | 8 ++++++++ kubernetes/templates/k3s/server/config.yaml.jinja2 | 1 + 2 files changed, 9 insertions(+) diff --git a/kubernetes/defaults/main.yml b/kubernetes/defaults/main.yml index 7966b04..c34d963 100644 --- a/kubernetes/defaults/main.yml +++ b/kubernetes/defaults/main.yml @@ -23,3 +23,11 @@ kubernetes: # One of [traefik-ingress] ingress_controller: traefik-ingress + + config_extra: + # etcd-tuning + # heartbeat: 0.5-1.5x of rtt + # election: 10x- of heartbeat + etcd-arg: + heartbeat-interval: 500 + election-timeout: 5000 diff --git a/kubernetes/templates/k3s/server/config.yaml.jinja2 b/kubernetes/templates/k3s/server/config.yaml.jinja2 index ba68c97..ab58922 100644 --- a/kubernetes/templates/k3s/server/config.yaml.jinja2 +++ b/kubernetes/templates/k3s/server/config.yaml.jinja2 @@ -49,3 +49,4 @@ node-label: - topology.kubernetes.io/zone={{ zone }} {% endif %} +{{ kubernetes.config_extra | to_yaml }}