File tree 3 files changed +32
-2
lines changed
3 files changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -266,7 +266,15 @@ listen {{ listener.get('name', listener_name) }}
266
266
{% - endfor %}
267
267
{% - endif %}
268
268
{% - endif %}
269
- {% - if 'httpcheck' in listener %}
269
+ {% - if 'httpchecks' in listener %}
270
+ {% - if listener .httpchecks is string %}
271
+ http-check {{ listener.httpchecks }}
272
+ {% - else %}
273
+ {% - for httpcheck in listener .httpchecks %}
274
+ http-check {{ httpcheck }}
275
+ {% - endfor %}
276
+ {% - endif %}
277
+ {% - elif 'httpcheck' in listener %} {# deprecated: but for compatibility #}
270
278
{% - if listener .httpcheck is string %}
271
279
http-check {{ listener.httpcheck }}
272
280
{% - endif %}
@@ -547,7 +555,15 @@ backend {{ backend.get('name', backend_name) }}
547
555
{% - endfor %}
548
556
{% - endif %}
549
557
{% - endif %}
550
- {% - if 'httpcheck' in backend %}
558
+ {% - if 'httpchecks' in backend %}
559
+ {% - if backend .httpchecks is string %}
560
+ http-check {{ backend.httpchecks }}
561
+ {% - else %}
562
+ {% - for httpcheck in backend .httpchecks %}
563
+ http-check {{ httpcheck }}
564
+ {% - endfor %}
565
+ {% - endif %}
566
+ {% - elif 'httpcheck' in backend %} {# deprecated: but for compatibility #}
551
567
{% - if backend .httpcheck is string %}
552
568
http-check {{ backend.httpcheck }}
553
569
{% - endif %}
Original file line number Diff line number Diff line change @@ -99,6 +99,9 @@ haproxy:
99
99
bind:
100
100
- "0.0.0.0:8998"
101
101
mode: http
102
+ options:
103
+ - httpchk
104
+ httpcheck: disable-on-404
102
105
stats:
103
106
enable: true
104
107
uri: "/admin?stats"
@@ -109,11 +112,15 @@ haproxy:
109
112
options:
110
113
- forwardfor
111
114
- http-server-close
115
+ - httpchk
112
116
defaultserver:
113
117
slowstart: 60s
114
118
maxconn: 256
115
119
maxqueue: 128
116
120
weight: 100
121
+ httpchecks:
122
+ - send-state
123
+ - expect status 200
117
124
servers:
118
125
web1:
119
126
host: web1.example.com
Original file line number Diff line number Diff line change @@ -79,6 +79,9 @@ haproxy:
79
79
bind:
80
80
- " 0.0.0.0:8998"
81
81
mode: http
82
+ options:
83
+ - httpchk
84
+ httpcheck: disable-on-404
82
85
stats:
83
86
enable: true
84
87
uri: " /admin?stats"
@@ -89,11 +92,15 @@ haproxy:
89
92
options:
90
93
- forwardfor
91
94
- http-server-close
95
+ - httpchk
92
96
defaultserver:
93
97
slowstart: 60s
94
98
maxconn: 256
95
99
maxqueue: 128
96
100
weight: 100
101
+ httpchecks:
102
+ - send-state
103
+ - expect status 200
97
104
servers:
98
105
web1:
99
106
host: web1.example.com
You can’t perform that action at this time.
0 commit comments