Skip to content

Commit

Permalink
Merge pull request #144 from tbauriedel/master
Browse files Browse the repository at this point in the history
add multiple selection of http_check
  • Loading branch information
tersmitten authored Jun 12, 2023
2 parents 51d6eab + 47b673b commit 52149b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ Set up (the latest version of) [HAProxy](http://www.haproxy.org/) in Ubuntu syst
* `haproxy_backend.{n}.source`: [optional]: Set the source address or interface for connections from the proxy
* `haproxy_backend.{n}.option`: [optional]: Options to set (e.g. `[forwardfor]`)
* `haproxy_backend.{n}.no_option`: [optional]: Options to unset (e.g. `[redispatch]`)
* `haproxy_backend.{n}.http_check`: [optional]: Make HTTP health checks consider response contents or specific status codes (e.g. `expect status 403`)
* `haproxy_backend.{n}.http_check.{n}`: [optional]: Configure HTTP health checks (e.g. `expect status 403`, `send meth GET uri /healthz`)
* `haproxy_backend.{n}.stick`: [optional]: Stick declarations
* `haproxy_backend.{n}.stick.{n}.table`: [required]: Configure the stickiness table for the current section (e.g. `type ip size 500k`)
* `haproxy_backend.{n}.stick.{n}.stick_on`: [optional]: Define a request pattern to associate a user to a server (e.g. `src`)
Expand Down
6 changes: 6 additions & 0 deletions templates/etc/haproxy/backend.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ backend {{ backend.name }}
no option {{ option }}
{% endfor %}
{% if backend.http_check is defined %}
{% if backend.http_check is string %}
http-check {{ backend.http_check }}
{% else %}
{% for http_check in backend.http_check %}
http-check {{ http_check }}
{% endfor %}
{% endif %}
{% endif %}
{% if backend.cookie is defined %}
cookie {{ backend.cookie }}
Expand Down

0 comments on commit 52149b4

Please sign in to comment.