The http checks can be customized.
This commit is contained in:
parent
a2a2943812
commit
d737274623
|
@ -9,6 +9,8 @@ docker_swarm_haproxy_swarm_port: '{{ docker_api_port }}'
|
||||||
#
|
#
|
||||||
docker_swarm_expose_api_via_haproxy: True
|
docker_swarm_expose_api_via_haproxy: True
|
||||||
docker_swarm_expose_api_hostname: 'swarm.example.com'
|
docker_swarm_expose_api_hostname: 'swarm.example.com'
|
||||||
|
docker_swarm_api_backend: 'dockersocket /var/run/docker.sock'
|
||||||
|
docker_swarm_api_check_availability: True
|
||||||
docker_swarm_api_networks_acl:
|
docker_swarm_api_networks_acl:
|
||||||
- '127.0.0.1/8'
|
- '127.0.0.1/8'
|
||||||
# Portainer
|
# Portainer
|
||||||
|
|
|
@ -147,7 +147,11 @@ frontend docker_ft
|
||||||
# swarm API
|
# swarm API
|
||||||
backend swarm_api_bck
|
backend swarm_api_bck
|
||||||
mode http
|
mode http
|
||||||
server dockersocket /var/run/docker.sock
|
{% if docker_swarm_api_check_availability %}
|
||||||
|
http-check send meth HEAD uri /version ver HTTP/1.1 hdr Host localhost
|
||||||
|
http-check expect rstatus (2|3)[0-9][0-9]
|
||||||
|
{% endif %}
|
||||||
|
server {{ docker_swarm_api_backend }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if docker_swarm_cluster_portainer_install %}
|
{% if docker_swarm_cluster_portainer_install %}
|
||||||
|
@ -165,8 +169,9 @@ backend {{ srv.acl_name }}_bck
|
||||||
mode http
|
mode http
|
||||||
option httpchk
|
option httpchk
|
||||||
balance {{ srv.balance_type | default('roundrobin') }}
|
balance {{ srv.balance_type | default('roundrobin') }}
|
||||||
http-check send meth HEAD uri / ver HTTP/1.1 hdr Host localhost
|
{% if srv.http_check_enabled is defined and srv.http_check_enabled %}
|
||||||
http-check expect rstatus (2|3)[0-9][0-9]
|
http-check send {{ srv.http_check }}
|
||||||
|
http-check expect {{ srv.http_check_expect }}
|
||||||
{% if srv.stick_sessions %}
|
{% if srv.stick_sessions %}
|
||||||
{% if srv.stick_on_cookie %}
|
{% if srv.stick_on_cookie %}
|
||||||
cookie {{ srv.stick_cookie }}
|
cookie {{ srv.stick_cookie }}
|
||||||
|
|
Loading…
Reference in New Issue