jcmoraisjr / haproxy-ingress

HAProxy Ingress
https://haproxy-ingress.github.io
Apache License 2.0
1.04k stars 269 forks source link

Allow to use DNS Service Discovery #758

Open ktaborski opened 3 years ago

ktaborski commented 3 years ago

What are you trying to do I am using tcp services, where single connection can take several seconds. In case of HAProxy reloads, backend Pods can get overloaded (new HAProxy process does not know amount of previous connections). I found, that HAProxy has possibility to use DNS service discovery: https://www.haproxy.com/blog/dns-service-discovery-haproxy/ Using this will allow to update/scale backend without HAProxy reloads.

What HAProxy Ingress should do or how it should behave differently Probably I can still use it by defining my custom haproxy.cfg template, but in my opinion it would be useful to community if this will be configured in configMap (for both http and tcp) and properly documented.

jcmoraisjr commented 3 years ago

Already in the v0.13 roadmap - we'll allow to configure tcp services using ingress resources, this way all L4 compatible backend configurations can be reused - including but not limited to dynamic updating - with or without dns discovery. You can follow #750 which will be included in the first v0.13 snapshot.

ktaborski commented 3 years ago

Thanks for your reply!

It's good, that this is under implementation.

After some digging I found, that it would be also good to allow usage of parse-resolv-conf function to define DNS resolvers https://www.haproxy.com/documentation/hapee/2-1r1/configuration/config-sections/resolvers/

What do you think?

jcmoraisjr commented 3 years ago

Yep, parse-resolv-conf seems to be a good addition, at least as a config-snippet-like option.

github-actions[bot] commented 3 years ago

This issue got stale and will be closed in 7 days.