k8s-sig-cluster-lifecycleawskubesprayhigh-availabilityansiblekubernetes-clustergcekubernetesbare-metal
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.
22 lines
890 B
22 lines
890 B
# contiv etcd config
|
|
{% if inventory_hostname in groups['kube-master'] %}
|
|
export ETCD_DATA_DIR=/var/lib/etcd/contiv-data
|
|
export ETCD_ADVERTISE_CLIENT_URLS={{ contiv_etcd_ad_urls }}
|
|
export ETCD_INITIAL_ADVERTISE_PEER_URLS={{ contiv_etcd_peer_urls }}
|
|
export ETCD_LISTEN_PEER_URLS={{ contiv_etcd_peer_urls }}
|
|
export ETCD_LISTEN_CLIENT_URLS={{ contiv_etcd_listen_urls | join(",") }}
|
|
export ETCD_NAME=
|
|
{%- for host in groups['kube-master'] -%}
|
|
{%- if host == inventory_hostname -%}
|
|
contiv_etcd{{ loop.index }}
|
|
{%- endif %}
|
|
{%- endfor %}
|
|
|
|
{% else %}
|
|
export ETCD_LISTEN_CLIENT_URLS=http://127.0.0.1:{{ contiv_etcd_listen_port }}
|
|
export ETCD_PROXY=on
|
|
{% endif %}
|
|
export ETCD_INITIAL_CLUSTER=
|
|
{%- for host in groups['kube-master'] -%}
|
|
contiv_etcd{{ loop.index }}=http://{{ hostvars[host]['ip'] | default(hostvars[host].ansible_default_ipv4['address']) }}:{{ contiv_etcd_peer_port }},
|
|
{%- endfor -%}
|