2018-08-17 22:25:35 +08:00
|
|
|
# Environment file for etcd {{ etcd_version }}
|
2017-03-24 00:56:30 +08:00
|
|
|
ETCD_DATA_DIR={{ etcd_data_dir }}
|
|
|
|
ETCD_ADVERTISE_CLIENT_URLS={{ etcd_client_url }}
|
|
|
|
ETCD_INITIAL_ADVERTISE_PEER_URLS={{ etcd_peer_url }}
|
2020-07-20 22:26:51 +08:00
|
|
|
ETCD_INITIAL_CLUSTER_STATE={% if etcd_cluster_is_healthy.rc == 0 | bool %}existing{% else %}new{% endif %}
|
2017-03-24 00:56:30 +08:00
|
|
|
|
2017-07-24 16:25:38 +08:00
|
|
|
ETCD_METRICS={{ etcd_metrics }}
|
2023-08-09 02:06:16 +08:00
|
|
|
{% if etcd_listen_metrics_urls is defined %}
|
|
|
|
ETCD_LISTEN_METRICS_URLS={{ etcd_listen_metrics_urls }}
|
|
|
|
{% elif etcd_metrics_port is defined %}
|
2020-05-11 03:21:51 +08:00
|
|
|
ETCD_LISTEN_METRICS_URLS=http://{{ etcd_address }}:{{ etcd_metrics_port }},http://127.0.0.1:{{ etcd_metrics_port }}
|
|
|
|
{% endif %}
|
2017-03-24 00:56:30 +08:00
|
|
|
ETCD_LISTEN_CLIENT_URLS=https://{{ etcd_address }}:2379,https://127.0.0.1:2379
|
|
|
|
ETCD_ELECTION_TIMEOUT={{ etcd_election_timeout }}
|
|
|
|
ETCD_HEARTBEAT_INTERVAL={{ etcd_heartbeat_interval }}
|
|
|
|
ETCD_INITIAL_CLUSTER_TOKEN=k8s_etcd
|
|
|
|
ETCD_LISTEN_PEER_URLS=https://{{ etcd_address }}:2380
|
|
|
|
ETCD_NAME={{ etcd_member_name }}
|
|
|
|
ETCD_PROXY=off
|
|
|
|
ETCD_INITIAL_CLUSTER={{ etcd_peer_addresses }}
|
2017-06-14 16:39:38 +08:00
|
|
|
ETCD_AUTO_COMPACTION_RETENTION={{ etcd_compaction_retention }}
|
2018-03-26 22:25:51 +08:00
|
|
|
{% if etcd_snapshot_count is defined %}
|
|
|
|
ETCD_SNAPSHOT_COUNT={{ etcd_snapshot_count }}
|
|
|
|
{% endif %}
|
2018-08-04 19:56:25 +08:00
|
|
|
{% if etcd_quota_backend_bytes is defined %}
|
|
|
|
ETCD_QUOTA_BACKEND_BYTES={{ etcd_quota_backend_bytes }}
|
|
|
|
{% endif %}
|
2022-05-24 00:36:03 +08:00
|
|
|
{% if etcd_max_request_bytes is defined %}
|
|
|
|
ETCD_MAX_REQUEST_BYTES={{ etcd_max_request_bytes }}
|
|
|
|
{% endif %}
|
2022-12-05 17:05:03 +08:00
|
|
|
{% if etcd_log_level is defined %}
|
|
|
|
ETCD_LOG_LEVEL={{ etcd_log_level }}
|
2018-11-17 15:59:40 +08:00
|
|
|
{% endif %}
|
2021-03-19 07:48:36 +08:00
|
|
|
{% if etcd_max_snapshots is defined %}
|
|
|
|
ETCD_MAX_SNAPSHOTS={{ etcd_max_snapshots }}
|
|
|
|
{% endif %}
|
|
|
|
{% if etcd_max_wals is defined %}
|
|
|
|
ETCD_MAX_WALS={{ etcd_max_wals }}
|
|
|
|
{% endif %}
|
2021-09-24 01:43:14 +08:00
|
|
|
# Flannel need etcd v2 API
|
2020-07-20 22:26:51 +08:00
|
|
|
ETCD_ENABLE_V2=true
|
2017-03-24 00:56:30 +08:00
|
|
|
|
|
|
|
# TLS settings
|
|
|
|
ETCD_TRUSTED_CA_FILE={{ etcd_cert_dir }}/ca.pem
|
|
|
|
ETCD_CERT_FILE={{ etcd_cert_dir }}/member-{{ inventory_hostname }}.pem
|
|
|
|
ETCD_KEY_FILE={{ etcd_cert_dir }}/member-{{ inventory_hostname }}-key.pem
|
2017-11-07 22:06:16 +08:00
|
|
|
ETCD_CLIENT_CERT_AUTH={{ etcd_secure_client | lower}}
|
|
|
|
|
2017-03-24 00:56:30 +08:00
|
|
|
ETCD_PEER_TRUSTED_CA_FILE={{ etcd_cert_dir }}/ca.pem
|
|
|
|
ETCD_PEER_CERT_FILE={{ etcd_cert_dir }}/member-{{ inventory_hostname }}.pem
|
|
|
|
ETCD_PEER_KEY_FILE={{ etcd_cert_dir }}/member-{{ inventory_hostname }}-key.pem
|
2018-01-12 02:07:43 +08:00
|
|
|
ETCD_PEER_CLIENT_CERT_AUTH={{ etcd_peer_client_auth }}
|
2018-04-19 01:16:42 +08:00
|
|
|
|
2020-12-08 10:13:10 +08:00
|
|
|
{% if etcd_tls_cipher_suites is defined %}
|
2020-12-09 05:23:34 +08:00
|
|
|
ETCD_CIPHER_SUITES={% for tls in etcd_tls_cipher_suites %}{{ tls }}{{ "," if not loop.last else "" }}{% endfor %}
|
2020-12-08 10:13:10 +08:00
|
|
|
{% endif %}
|
|
|
|
|
2018-05-01 15:42:00 +08:00
|
|
|
{% for key, value in etcd_extra_vars.items() %}
|
2018-04-19 01:16:42 +08:00
|
|
|
{{ key }}={{ value }}
|
|
|
|
{% endfor %}
|
2018-08-21 23:53:23 +08:00
|
|
|
|
2020-03-06 18:05:23 +08:00
|
|
|
# CLI settings
|
|
|
|
ETCDCTL_ENDPOINTS=https://127.0.0.1:2379
|
2020-07-20 22:26:51 +08:00
|
|
|
ETCDCTL_CACERT={{ etcd_cert_dir }}/ca.pem
|
|
|
|
ETCDCTL_KEY={{ etcd_cert_dir }}/admin-{{ inventory_hostname }}-key.pem
|
|
|
|
ETCDCTL_CERT={{ etcd_cert_dir }}/admin-{{ inventory_hostname }}.pem
|
2022-03-31 23:17:01 +08:00
|
|
|
|
|
|
|
# ETCD 3.5.x issue
|
|
|
|
# https://groups.google.com/a/kubernetes.io/g/dev/c/B7gJs88XtQc/m/rSgNOzV2BwAJ?utm_medium=email&utm_source=footer
|
2023-02-06 17:35:16 +08:00
|
|
|
ETCD_EXPERIMENTAL_INITIAL_CORRUPT_CHECK={{ etcd_experimental_initial_corrupt_check }}
|
2023-12-19 11:00:10 +08:00
|
|
|
|
|
|
|
{% if etcd_experimental_enable_distributed_tracing %}
|
|
|
|
ETCD_EXPERIMENTAL_ENABLE_DISTRIBUTED_TRACING=true
|
2024-05-13 18:14:39 +08:00
|
|
|
ETCD_EXPERIMENTAL_DISTRIBUTED_TRACING_SAMPLING_RATE={{ etcd_experimental_distributed_tracing_sample_rate }}
|
2023-12-19 11:00:10 +08:00
|
|
|
ETCD_EXPERIMENTAL_DISTRIBUTED_TRACING_ADDRESS={{ etcd_experimental_distributed_tracing_address }}
|
|
|
|
ETCD_EXPERIMENTAL_DISTRIBUTED_TRACING_SERVICE_NAME={{ etcd_experimental_distributed_tracing_service_name }}
|
|
|
|
ETCD_EXPERIMENTAL_DISTRIBUTED_TRACING_INSTANCE_ID={{ etcd_member_name }}
|
2024-05-13 18:14:39 +08:00
|
|
|
{% endif %}
|
2024-09-05 13:29:05 +08:00
|
|
|
|
|
|
|
ETCD_EXPERIMENTAL_WATCH_PROGRESS_NOTIFY_INTERVAL={{ etcd_experimental_watch_progress_notify_interval }}
|