|
@@ -8,12 +8,8 @@
|
|
{% endfor -%}
|
|
{% endfor -%}
|
|
{% endmacro -%}
|
|
{% endmacro -%}
|
|
|
|
|
|
-{% if (etcd_peers | default([]) | length > 1) or (etcd_is_thirdparty) %}
|
|
|
|
ETCD_NAME={{ etcd_hostname }}
|
|
ETCD_NAME={{ etcd_hostname }}
|
|
ETCD_LISTEN_PEER_URLS={{ etcd_listen_peer_urls }}
|
|
ETCD_LISTEN_PEER_URLS={{ etcd_listen_peer_urls }}
|
|
-{% else %}
|
|
|
|
-ETCD_NAME=default
|
|
|
|
-{% endif %}
|
|
|
|
ETCD_DATA_DIR={{ etcd_data_dir }}
|
|
ETCD_DATA_DIR={{ etcd_data_dir }}
|
|
#ETCD_SNAPSHOT_COUNTER=10000
|
|
#ETCD_SNAPSHOT_COUNTER=10000
|
|
ETCD_HEARTBEAT_INTERVAL=500
|
|
ETCD_HEARTBEAT_INTERVAL=500
|
|
@@ -23,20 +19,20 @@ ETCD_LISTEN_CLIENT_URLS={{ etcd_listen_client_urls }}
|
|
#ETCD_MAX_WALS=5
|
|
#ETCD_MAX_WALS=5
|
|
#ETCD_CORS=
|
|
#ETCD_CORS=
|
|
|
|
|
|
-{% if etcd_is_thirdparty %}
|
|
|
|
|
|
+
|
|
#[cluster]
|
|
#[cluster]
|
|
ETCD_INITIAL_ADVERTISE_PEER_URLS={{ etcd_initial_advertise_peer_urls }}
|
|
ETCD_INITIAL_ADVERTISE_PEER_URLS={{ etcd_initial_advertise_peer_urls }}
|
|
-
|
|
|
|
|
|
+{% if etcd_is_thirdparty %}
|
|
# TODO: This needs to be altered to support the correct etcd instances
|
|
# TODO: This needs to be altered to support the correct etcd instances
|
|
ETCD_INITIAL_CLUSTER={{ etcd_hostname}}={{ etcd_initial_advertise_peer_urls }}
|
|
ETCD_INITIAL_CLUSTER={{ etcd_hostname}}={{ etcd_initial_advertise_peer_urls }}
|
|
ETCD_INITIAL_CLUSTER_STATE={{ etcd_initial_cluster_state }}
|
|
ETCD_INITIAL_CLUSTER_STATE={{ etcd_initial_cluster_state }}
|
|
ETCD_INITIAL_CLUSTER_TOKEN=thirdparty-etcd-cluster-1
|
|
ETCD_INITIAL_CLUSTER_TOKEN=thirdparty-etcd-cluster-1
|
|
-{% endif %}
|
|
|
|
-
|
|
|
|
-{% if etcd_peers | default([]) | length > 1 %}
|
|
|
|
-#[cluster]
|
|
|
|
-ETCD_INITIAL_ADVERTISE_PEER_URLS={{ etcd_initial_advertise_peer_urls }}
|
|
|
|
|
|
+{% else %}
|
|
|
|
+{% if initial_etcd_cluster is defined and initial_etcd_cluster %}
|
|
|
|
+ETCD_INITIAL_CLUSTER={{ initial_etcd_cluster }}
|
|
|
|
+{% else %}
|
|
ETCD_INITIAL_CLUSTER={{ initial_cluster() }}
|
|
ETCD_INITIAL_CLUSTER={{ initial_cluster() }}
|
|
|
|
+{% endif %}
|
|
ETCD_INITIAL_CLUSTER_STATE={{ etcd_initial_cluster_state }}
|
|
ETCD_INITIAL_CLUSTER_STATE={{ etcd_initial_cluster_state }}
|
|
ETCD_INITIAL_CLUSTER_TOKEN={{ etcd_initial_cluster_token }}
|
|
ETCD_INITIAL_CLUSTER_TOKEN={{ etcd_initial_cluster_token }}
|
|
#ETCD_DISCOVERY=
|
|
#ETCD_DISCOVERY=
|