Fix missing time units for haproxy timeout
- if unit is missing, assume 'ms' and append it
- otherwise use param as is
- also fix sample pillars in README
- add timeout params to test pillars
Fixes: PROD-33213
Change-Id: Ie5074b6df0d05ff690d9b60046b58c0585ade437
diff --git a/README.rst b/README.rst
index 659d66e..503c2ca 100644
--- a/README.rst
+++ b/README.rst
@@ -48,9 +48,9 @@
enabled: True
maxconn: 1024
timeout:
- connect: 5000
- client: 50000
- server: 50000
+ connect: 5000ms
+ client: 50000ms
+ server: 50000ms
listen:
https-in:
binds:
@@ -65,6 +65,10 @@
port: 8443
params: 'maxconn 256'
+.. note::
+
+ Timeout values are assumed to be defined in 'ms' if no other unit is specifically defined.
+
Sample pillar with custom logging
@@ -75,9 +79,9 @@
enabled: True
maxconn: 1024
timeout:
- connect: 5000
- client: 50000
- server: 50000
+ connect: 5000ms
+ client: 50000ms
+ server: 50000ms
listen:
https-in:
binds:
@@ -92,6 +96,11 @@
port: 8443
params: 'maxconn 256'
+
+.. note::
+
+ Timeout values are assumed to be defined in 'ms' if no other unit is specifically defined.
+
.. code-block:: yaml
haproxy:
@@ -499,9 +508,9 @@
stats_bind_process: "1 2"
maxconn: 1024
timeout:
- connect: 5000
- client: 50000
- server: 50000
+ connect: 5000ms
+ client: 50000ms
+ server: 50000ms
listen:
https-in:
bind_process: "1 2 3 4"
@@ -517,6 +526,10 @@
port: 8443
params: 'maxconn 256'
+.. note::
+
+ Timeout values are assumed to be defined in 'ms' if no other unit is specifically defined.
+
Implement rate limiting, to prevent excessive requests
This feature only works if using 'format: end'
@@ -556,8 +569,8 @@
mode: tcp
balance: roundrobin
timeout:
- check: 10
- client: 20
+ check: 10s
+ client: 20s
http_request:
- action: "add-header X-Forwarded-Proto https"
condition: "if { ssl_fc }"
@@ -603,6 +616,10 @@
- auth admin1:AdMiN123
rate_limit_sessions: 1000
+.. note::
+
+ Timeout values are assumed to be defined in 'ms' if no other unit is specifically defined.
+
Implement rate limiting, to prevent excessive requests
using 'format: listen'