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.

55 lines
2.2 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. # Flannel need etcd v2 API
  29. ETCD_ENABLE_V2=true
  30. # TLS settings
  31. ETCD_TRUSTED_CA_FILE={{ etcd_cert_dir }}/ca.pem
  32. ETCD_CERT_FILE={{ etcd_cert_dir }}/member-{{ inventory_hostname }}.pem
  33. ETCD_KEY_FILE={{ etcd_cert_dir }}/member-{{ inventory_hostname }}-key.pem
  34. ETCD_CLIENT_CERT_AUTH={{ etcd_secure_client | lower}}
  35. ETCD_PEER_TRUSTED_CA_FILE={{ etcd_cert_dir }}/ca.pem
  36. ETCD_PEER_CERT_FILE={{ etcd_cert_dir }}/member-{{ inventory_hostname }}.pem
  37. ETCD_PEER_KEY_FILE={{ etcd_cert_dir }}/member-{{ inventory_hostname }}-key.pem
  38. ETCD_PEER_CLIENT_CERT_AUTH={{ etcd_peer_client_auth }}
  39. {% for key, value in etcd_extra_vars.items() %}
  40. {{ key }}={{ value }}
  41. {% endfor %}
  42. {% if host_architecture != "amd64" -%}
  43. ETCD_UNSUPPORTED_ARCH={{host_architecture}}
  44. {%- endif %}
  45. # CLI settings
  46. ETCDCTL_ENDPOINTS=https://127.0.0.1:2379
  47. ETCDCTL_CACERT={{ etcd_cert_dir }}/ca.pem
  48. ETCDCTL_KEY={{ etcd_cert_dir }}/admin-{{ inventory_hostname }}-key.pem
  49. ETCDCTL_CERT={{ etcd_cert_dir }}/admin-{{ inventory_hostname }}.pem