http2 is now optional. check options for the backends

This commit is contained in:
Andrea Dell'Amico 2020-11-16 17:18:32 +01:00
parent 1b5a413f02
commit 7d17bf46f9
2 changed files with 3 additions and 2 deletions

View File

@ -27,3 +27,4 @@ docker_swarm_keepalived_vrouter_id: 205
docker_swarm_keepalived_floating_ip: '127.0.0.1/8'
docker_swarm_keepalived_instance_name: 'VI_HAPROXY_1'
docker_swarm_haproxy_loglevel: '{{ haproxy_loglevel }}'
docker_swarm_haproxy_http2_enabled: True

View File

@ -72,7 +72,7 @@ listen local_stats
stats realm HAProxy\ Statistics
frontend http
bind *:{{ https_port }} ssl crt {{ haproxy_cert_dir }} alpn h2,http/1.1 {% if docker_swarm_haproxy_installation_type == 'global' %}accept-proxy{% endif %}
bind *:{{ https_port }} ssl crt {{ haproxy_cert_dir }} {% if docker_swarm_haproxy_http2_enabled %}alpn h2,{% endif %}http/1.1 {% if docker_swarm_haproxy_installation_type == 'global' %}accept-proxy{% endif %}
bind *:{{ haproxy_default_port }} {% if docker_swarm_haproxy_installation_type == 'global' %}accept-proxy{% endif %}
@ -184,5 +184,5 @@ backend {{ srv.acl_name }}_bck
stick-table {{ srv.stick_table }}
{% endif %}
{% endif %}
server-template {{ srv.service_name }}- {{ srv.service_replica_num }} {{ srv.stack_name }}_{{ srv.service_name }}:{{ srv.service_port }} {{ srv.backend_options | default('') }} {% if srv.http_check_enabled is defined and srv.http_check_enabled %}check{% endif %} resolvers docker init-addr libc,none
server-template {{ srv.service_name }}- {{ srv.service_replica_num }} {{ srv.stack_name }}_{{ srv.service_name }}:{{ srv.service_port }} {{ srv.backend_options | default('') }} {% if srv.http_check_enabled is defined and srv.http_check_enabled %}check {{ srv.check_options | default('') }}{% endif %} resolvers docker init-addr libc,none
{% endfor %}