etcd chart: additional env vars for etcd pods

Allows extra environment variables to be applied to the etcd pods. Can
be used to apply tuning parameters, enable experimental flags, etc.

Change-Id: I9d82514b6e3a292edc472d885c0a61d5c81199f5
This commit is contained in:
Phil Sphicas 2020-02-07 16:06:43 -08:00
parent 7d5baf4e25
commit 7c6043772b
2 changed files with 8 additions and 0 deletions

View File

@ -123,6 +123,7 @@ spec:
value: https://$(POD_IP):{{ .Values.network.service_peer.target_port }}
- name: MANIFEST_PATH
value: /manifests/{{ .Values.service.name }}.yaml
{{ include "helm-toolkit.utils.to_k8s_env_vars" .Values.pod.env.etcd | indent 8 }}
{{ dict "envAll" $envAll "component" "etcd" "container" "etcd" "type" "readiness" "probeTemplate" (include "etcdreadinessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 6 }}
{{ dict "envAll" $envAll "component" "etcd" "container" "etcd" "type" "liveness" "probeTemplate" (include "etcdlivenessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 6 }}
volumeMounts:

View File

@ -188,6 +188,13 @@ pod:
# requires override for a specific use case e.g. calico-etcd or kubernetes-etcd
example-etcd:
etcd: localhost/docker-default
env:
etcd:
# can be used for tuning, e.g. https://etcd.io/docs/v3.4.0/tuning/
# or other flags, e.g. https://etcd.io/docs/v3.4.0/op-guide/configuration/
# ETCD_HEARTBEAT_INTERVAL: 100
# ETCD_ELECTION_TIMEOUT: 1000
# ETCD_SNAPSHOT_COUNT: 10000
jobs:
etcd_backup: