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.

65 lines
2.5 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_metrics_port is defined %}
  8. ETCD_LISTEN_METRICS_URLS=http://{{ etcd_address }}:{{ etcd_metrics_port }},http://127.0.0.1:{{ etcd_metrics_port }}
  9. {% endif %}
  10. ETCD_LISTEN_CLIENT_URLS=https://{{ etcd_address }}:2379,https://127.0.0.1:2379
  11. ETCD_ELECTION_TIMEOUT={{ etcd_election_timeout }}
  12. ETCD_HEARTBEAT_INTERVAL={{ etcd_heartbeat_interval }}
  13. ETCD_INITIAL_CLUSTER_TOKEN=k8s_etcd
  14. ETCD_LISTEN_PEER_URLS=https://{{ etcd_address }}:2380
  15. ETCD_NAME={{ etcd_member_name }}
  16. ETCD_PROXY=off
  17. ETCD_INITIAL_CLUSTER={{ etcd_peer_addresses }}
  18. ETCD_AUTO_COMPACTION_RETENTION={{ etcd_compaction_retention }}
  19. {% if etcd_snapshot_count is defined %}
  20. ETCD_SNAPSHOT_COUNT={{ etcd_snapshot_count }}
  21. {% endif %}
  22. {% if etcd_quota_backend_bytes is defined %}
  23. ETCD_QUOTA_BACKEND_BYTES={{ etcd_quota_backend_bytes }}
  24. {% endif %}
  25. {% if etcd_log_package_levels is defined %}
  26. ETCD_LOG_PACKAGE_LEVELS={{ etcd_log_package_levels }}
  27. {% endif %}
  28. {% if etcd_max_snapshots is defined %}
  29. ETCD_MAX_SNAPSHOTS={{ etcd_max_snapshots }}
  30. {% endif %}
  31. {% if etcd_max_wals is defined %}
  32. ETCD_MAX_WALS={{ etcd_max_wals }}
  33. {% endif %}
  34. # Flannel need etcd v2 API
  35. ETCD_ENABLE_V2=true
  36. # TLS settings
  37. ETCD_TRUSTED_CA_FILE={{ etcd_cert_dir }}/ca.pem
  38. ETCD_CERT_FILE={{ etcd_cert_dir }}/member-{{ inventory_hostname }}.pem
  39. ETCD_KEY_FILE={{ etcd_cert_dir }}/member-{{ inventory_hostname }}-key.pem
  40. ETCD_CLIENT_CERT_AUTH={{ etcd_secure_client | lower}}
  41. ETCD_PEER_TRUSTED_CA_FILE={{ etcd_cert_dir }}/ca.pem
  42. ETCD_PEER_CERT_FILE={{ etcd_cert_dir }}/member-{{ inventory_hostname }}.pem
  43. ETCD_PEER_KEY_FILE={{ etcd_cert_dir }}/member-{{ inventory_hostname }}-key.pem
  44. ETCD_PEER_CLIENT_CERT_AUTH={{ etcd_peer_client_auth }}
  45. {% if etcd_tls_cipher_suites is defined %}
  46. ETCD_CIPHER_SUITES={% for tls in etcd_tls_cipher_suites %}{{ tls }}{{ "," if not loop.last else "" }}{% endfor %}
  47. {% endif %}
  48. {% for key, value in etcd_extra_vars.items() %}
  49. {{ key }}={{ value }}
  50. {% endfor %}
  51. {% if host_architecture != "amd64" -%}
  52. ETCD_UNSUPPORTED_ARCH={{host_architecture}}
  53. {%- endif %}
  54. # CLI settings
  55. ETCDCTL_ENDPOINTS=https://127.0.0.1:2379
  56. ETCDCTL_CACERT={{ etcd_cert_dir }}/ca.pem
  57. ETCDCTL_KEY={{ etcd_cert_dir }}/admin-{{ inventory_hostname }}-key.pem
  58. ETCDCTL_CERT={{ etcd_cert_dir }}/admin-{{ inventory_hostname }}.pem