Allow setting a passive health checks
This commit is contained in:
parent
373ab3a796
commit
e2063d9eba
@ -4,12 +4,13 @@ upstream {{ item.value.upstreams[upstream].name }} {
|
|||||||
{{ item.value.upstreams[upstream].lb_method }};
|
{{ item.value.upstreams[upstream].lb_method }};
|
||||||
zone {{ item.value.upstreams[upstream].zone_name }} {{ item.value.upstreams[upstream].zone_size }};
|
zone {{ item.value.upstreams[upstream].zone_name }} {{ item.value.upstreams[upstream].zone_size }};
|
||||||
{% for server in item.value.upstreams[upstream].servers %}
|
{% for server in item.value.upstreams[upstream].servers %}
|
||||||
server {{ item.value.upstreams[upstream].servers[server].address }}:{{ item.value.upstreams[upstream].servers[server].port }} weight={{ item.value.upstreams[upstream].servers[server].weight|default("1") }};
|
server {{ item.value.upstreams[upstream].servers[server].address }}:{{ item.value.upstreams[upstream].servers[server].port }} weight={{ item.value.upstreams[upstream].servers[server].weight|default("1") }} {{ item.value.upstreams[upstream].servers[server].health_check|default("") }};
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if item.value.upstreams[upstream].sticky_cookie %}
|
{% if item.value.upstreams[upstream].sticky_cookie %}
|
||||||
sticky cookie srv_id expires=1h path=/;
|
sticky cookie srv_id expires=1h path=/;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
}
|
}
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user