kubernetes-ingress icon indicating copy to clipboard operation
kubernetes-ingress copied to clipboard

Named backend server instead of generic SRV_x name

Open pawellrus opened this issue 1 year ago • 11 comments

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.

pawellrus avatar Jul 09 '24 19:07 pawellrus

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

fabianonunes avatar Jul 09 '24 20:07 fabianonunes

@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?

pawellrus avatar Jul 10 '24 06:07 pawellrus

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

ivanmatmati avatar Jul 10 '24 13:07 ivanmatmati

@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?

pawellrus avatar Jul 10 '24 13:07 pawellrus

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.

stale[bot] avatar Aug 09 '24 15:08 stale[bot]

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 ?

hoerup avatar Aug 20 '24 06:08 hoerup

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

ivanmatmati avatar Aug 28 '24 07:08 ivanmatmati

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.

stale[bot] avatar Sep 28 '24 04:09 stale[bot]

This change would also improve metrics. Right now there are dozens of SRV_x servers reported in the metrics which is difficult to follow. (that also relates to https://github.com/haproxytech/kubernetes-ingress/issues/670)

mike-code avatar Sep 30 '24 00:09 mike-code

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.

stale[bot] avatar Nov 04 '24 01:11 stale[bot]

@mike-code the ones that are marked for maint are the ones that are marked from kubernetes to be soon removed.

@hoerup about

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 ?

this is in roadmap, its a bit more complicated that would would think initially, but we do have that in plans

oktalz avatar Nov 06 '24 11:11 oktalz