haproxytech / kubernetes-ingress

HAProxy Kubernetes Ingress Controller
https://www.haproxy.com/documentation/kubernetes/
Apache License 2.0
702 stars 199 forks source link

Named backend server instead of generic SRV_x name #662

Open pawellrus opened 1 month ago

pawellrus commented 1 month ago

Hello. I'm interesting, is it possible to define custom backend downstream server names instead of generic naming SRV_x? For example it could be the pod name or another custom value passed by annotation.

This is critical in some kind of scenarios like rolling update with putting backend server for maint. Now in UI it's not possible to understand which backend will go to maint.

fabianonunes commented 1 month ago

I don't think this is possible today: https://github.com/haproxy/haproxy/issues/952

pawellrus commented 1 month ago

@fabianonunes i'm not talking about renaming in runtime. i'm talking about correct naming before populatin backend configuration. Btw may be there is another way to diffrentiate backend servers during runtime. Via labels or something like that?

ivanmatmati commented 1 month ago

Hi @pawellrus , servers names are statically generated by the controller. No tweak possible.

pawellrus commented 1 month ago

@ivanmatmati so it's impossible to put selected pod to maintenance before dis-labeling them to make sure that users' sessions won't broke forcefully?

stale[bot] commented 3 weeks ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

hoerup commented 2 weeks ago

wouldn't it be possible to use "add server backend-name/podname ip:port" for new entries and "del server backend-name/podname" when removing ?

ivanmatmati commented 1 week ago

@pawellrus , the servers list the ip address of the pod so you can always find the original pod.