From 58fa6d62e0678d5d25481f9ed9235fb64db373f8 Mon Sep 17 00:00:00 2001 From: Gabriel Cocenza Date: Wed, 26 Oct 2022 16:29:24 -0300 Subject: [PATCH] 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 --- config.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/config.yaml b/config.yaml index 540856c..e954ed2 100644 --- a/config.yaml +++ b/config.yaml @@ -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 . + 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