Add support for HAProxy L7 checks

This change add several configuration options to enable HTTP checks
to the HAProxy configuration, instead of the default TCP connection
checks (which continue to be the default)

Closes-Bug: #1880610
Change-Id: Id42370fe07a2bcbcf28993d44f943d2b5c142107
This commit is contained in:
Gabriel Cocenza 2022-10-26 16:29:24 -03:00
parent 34311a62e9
commit b96a48ca87
1 changed files with 20 additions and 0 deletions

View File

@ -95,6 +95,26 @@ options:
description: |
Connect timeout configuration in ms for haproxy, used in HA
configurations. If not provided, default value of 9000ms is used.
haproxy-check-http:
type: boolean
default: False
description: |
If True uses HTTP (Layer 7) checks for backends in haproxy, used in HA
configurations. If False uses a TCP check (default).
haproxy-check-request:
type: string
default: option httpchk GET /healthcheck
description: |
Enables HTTP protocol to check on the servers health: option httpchk <method> <uri>.
This config is used when haproxy-check-http is enabled.
See https://www.haproxy.com/documentation/hapee/latest/onepage/#4-option%20httpchk
haproxy-check-expected:
type: string
default: http-check expect status 200
description: |
Make HTTP health checks consider response contents or specific status codes.
This config is used when haproxy-check-http is enabled.
See https://www.haproxy.com/documentation/hapee/latest/onepage/#http-check%20expect
dns-ha:
type: boolean
default: False