Thank you for participating, Willy!

Yes you’re right.

I can agree only partially with your proposal, it have sense, but let’s imagine 
we have this backend section:

backend be_myapp
  server srv1 10.0.0.1:80 check port 8080

and we’re trying to use external-check, currently we will receive
HAPROXY_SERVER_ADDR – 10.0.0.1
HAPROXY_SERVER_ PORT – 80

and after my change additionally

HAPROXY_SERVER_CHECK_PORT – 8080

But there is no addr in check directive. Might be in future someone will add 
support of

server srv1 10.0.0.1:80 check addr 10.0.0.2 port 8080

and it will have sense to add HAPROXY_SERVER_CHECK_ADDR – 10.0.0.2 but 
currently … I only need these `check port`.

Thank you!


От: Willy Tarreau <w...@1wt.eu>
Дата: пятница, 24 ноября 2023 г. в 14:42
Кому: Payne Max <yardalge...@gmail.com>
Копия: Christopher Faulet <cfau...@haproxy.com>, haproxy@formilux.org 
<haproxy@formilux.org>
Тема: Re: [PATCH] Add HAPROXY_SERVER_CHECK_PORT to the external check
On Fri, Nov 24, 2023 at 10:04:42AM +0000, Payne Max wrote:
> Christopher, thanks for you review, I'm only saving general approach to the
> indentation and to follow it I need to move other lines ...
>
> User passes some check port to the `backed.server` line and I want to provide
> this port to the external-check script. Because for an example when we're
> using haproxy as a loadbalancer for our Kubernetes service, we have service
> port + healthcheck port and our external-check script should balance traffic
> on service port but send availability requests to the healtcheck port => but
> currently external-check don't have any variants to receive this check port
> from check directive of the `backed.server` line.

So if I understand it correctly, you'd like that the external check can
be partially configured directly from the server line's "port" directive ?
After all, why not. But then in this case, wouldn't it make sense to also
add HAPROXY_SERVER_CHECK_ADDR with the contents of the "addr" parameter ?
Otherwise someone configuring both would only have the port and not the
address, which looks a bit odd.

Willy

Reply via email to