49 lines
1.1 KiB
Django/Jinja
49 lines
1.1 KiB
Django/Jinja
frontend tcp_talosapi
|
|
mode tcp
|
|
option tcplog
|
|
bind :50000
|
|
default_backend bk_talosapi
|
|
|
|
backend bk_talosapi
|
|
mode tcp
|
|
balance leastconn
|
|
{% for talos_node in groups['cluster_' + cluster_name_short] %}
|
|
{% if talos_node in groups['talos_control_nodes'] %}
|
|
server {{ talos_node }} {{ hostvars[talos_node].ansible_host }}:50000
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
####
|
|
|
|
frontend tcp_talostrustd
|
|
mode tcp
|
|
option tcplog
|
|
bind :50001
|
|
default_backend bk_talostrustd
|
|
|
|
backend bk_talostrustd
|
|
mode tcp
|
|
balance leastconn
|
|
{% for talos_node in groups['cluster_' + cluster_name_short] %}
|
|
{% if talos_node in groups['talos_control_nodes'] %}
|
|
server {{ talos_node }} {{ hostvars[talos_node].ansible_host }}:50001
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
####
|
|
|
|
frontend tcp_kubeapi
|
|
mode tcp
|
|
option tcplog
|
|
bind :6443
|
|
default_backend bk_kubeapi
|
|
|
|
backend bk_kubeapi
|
|
mode tcp
|
|
balance leastconn
|
|
{% for talos_node in groups['cluster_' + cluster_name_short] %}
|
|
{% if talos_node in groups['talos_control_nodes'] %}
|
|
server {{ talos_node }} {{ hostvars[talos_node].ansible_host }}:6443 check
|
|
{% endif %}
|
|
{% endfor %}
|