You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
3.4 KiB

  1. # Environment file for etcd {{ etcd_version }}
  2. ETCD_DATA_DIR={{ etcd_data_dir }}
  3. ETCD_ADVERTISE_CLIENT_URLS={{ etcd_client_url }}
  4. ETCD_INITIAL_ADVERTISE_PEER_URLS={{ etcd_peer_url }}
  5. ETCD_INITIAL_CLUSTER_STATE={% if etcd_cluster_is_healthy.rc == 0 | bool %}existing{% else %}new{% endif %}
  6. ETCD_METRICS={{ etcd_metrics }}
  7. {% if etcd_listen_metrics_urls is defined %}
  8. ETCD_LISTEN_METRICS_URLS={{ etcd_listen_metrics_urls }}
  9. {% elif etcd_metrics_port is defined %}
  10. ETCD_LISTEN_METRICS_URLS=http://{{ etcd_address }}:{{ etcd_metrics_port }},http://127.0.0.1:{{ etcd_metrics_port }}
  11. {% endif %}
  12. ETCD_LISTEN_CLIENT_URLS=https://{{ etcd_address }}:2379,https://127.0.0.1:2379
  13. ETCD_ELECTION_TIMEOUT={{ etcd_election_timeout }}
  14. ETCD_HEARTBEAT_INTERVAL={{ etcd_heartbeat_interval }}
  15. ETCD_INITIAL_CLUSTER_TOKEN=k8s_etcd
  16. ETCD_LISTEN_PEER_URLS=https://{{ etcd_address }}:2380
  17. ETCD_NAME={{ etcd_member_name }}
  18. ETCD_PROXY=off
  19. ETCD_INITIAL_CLUSTER={{ etcd_peer_addresses }}
  20. ETCD_AUTO_COMPACTION_RETENTION={{ etcd_compaction_retention }}
  21. {% if etcd_snapshot_count is defined %}
  22. ETCD_SNAPSHOT_COUNT={{ etcd_snapshot_count }}
  23. {% endif %}
  24. {% if etcd_quota_backend_bytes is defined %}
  25. ETCD_QUOTA_BACKEND_BYTES={{ etcd_quota_backend_bytes }}
  26. {% endif %}
  27. {% if etcd_max_request_bytes is defined %}
  28. ETCD_MAX_REQUEST_BYTES={{ etcd_max_request_bytes }}
  29. {% endif %}
  30. {% if etcd_log_level is defined %}
  31. ETCD_LOG_LEVEL={{ etcd_log_level }}
  32. {% endif %}
  33. {% if etcd_max_snapshots is defined %}
  34. ETCD_MAX_SNAPSHOTS={{ etcd_max_snapshots }}
  35. {% endif %}
  36. {% if etcd_max_wals is defined %}
  37. ETCD_MAX_WALS={{ etcd_max_wals }}
  38. {% endif %}
  39. # Flannel need etcd v2 API
  40. ETCD_ENABLE_V2=true
  41. # TLS settings
  42. ETCD_TRUSTED_CA_FILE={{ etcd_cert_dir }}/ca.pem
  43. ETCD_CERT_FILE={{ etcd_cert_dir }}/member-{{ inventory_hostname }}.pem
  44. ETCD_KEY_FILE={{ etcd_cert_dir }}/member-{{ inventory_hostname }}-key.pem
  45. ETCD_CLIENT_CERT_AUTH={{ etcd_secure_client | lower}}
  46. ETCD_PEER_TRUSTED_CA_FILE={{ etcd_cert_dir }}/ca.pem
  47. ETCD_PEER_CERT_FILE={{ etcd_cert_dir }}/member-{{ inventory_hostname }}.pem
  48. ETCD_PEER_KEY_FILE={{ etcd_cert_dir }}/member-{{ inventory_hostname }}-key.pem
  49. ETCD_PEER_CLIENT_CERT_AUTH={{ etcd_peer_client_auth }}
  50. {% if etcd_tls_cipher_suites is defined %}
  51. ETCD_CIPHER_SUITES={% for tls in etcd_tls_cipher_suites %}{{ tls }}{{ "," if not loop.last else "" }}{% endfor %}
  52. {% endif %}
  53. {% for key, value in etcd_extra_vars.items() %}
  54. {{ key }}={{ value }}
  55. {% endfor %}
  56. # CLI settings
  57. ETCDCTL_ENDPOINTS=https://127.0.0.1:2379
  58. ETCDCTL_CACERT={{ etcd_cert_dir }}/ca.pem
  59. ETCDCTL_KEY={{ etcd_cert_dir }}/admin-{{ inventory_hostname }}-key.pem
  60. ETCDCTL_CERT={{ etcd_cert_dir }}/admin-{{ inventory_hostname }}.pem
  61. # ETCD 3.5.x issue
  62. # https://groups.google.com/a/kubernetes.io/g/dev/c/B7gJs88XtQc/m/rSgNOzV2BwAJ?utm_medium=email&utm_source=footer
  63. ETCD_EXPERIMENTAL_INITIAL_CORRUPT_CHECK={{ etcd_experimental_initial_corrupt_check }}
  64. {% if etcd_experimental_enable_distributed_tracing %}
  65. ETCD_EXPERIMENTAL_ENABLE_DISTRIBUTED_TRACING=true
  66. ETCD_EXPERIMENTAL_DISTRIBUTED_TRACING_SAMPLING_RATE={{ etcd_experimental_distributed_tracing_sample_rate }}
  67. ETCD_EXPERIMENTAL_DISTRIBUTED_TRACING_ADDRESS={{ etcd_experimental_distributed_tracing_address }}
  68. ETCD_EXPERIMENTAL_DISTRIBUTED_TRACING_SERVICE_NAME={{ etcd_experimental_distributed_tracing_service_name }}
  69. ETCD_EXPERIMENTAL_DISTRIBUTED_TRACING_INSTANCE_ID={{ etcd_member_name }}
  70. {% endif %}
  71. ETCD_EXPERIMENTAL_WATCH_PROGRESS_NOTIFY_INTERVAL={{ etcd_experimental_watch_progress_notify_interval }}