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

Configure accept-proxy

Open MarcoPereira7 opened this issue 1 year ago • 4 comments

Is there any way of configuring "accept-proxy" in a frontend block using HAProxy ingress controller?

What I want to do is preserve the real client IP when using this proxy. I am trying some configurations but without success. I step into this documentation:

https://www.haproxy.com/documentation/aloha/latest/load-balancing/client-ip-preservation/enable-proxy-protocol/

I don't know if it also not going to work, but i want to give it a try if it is possible via the ingress controller.

MarcoPereira7 avatar Jan 11 '24 19:01 MarcoPereira7

Hi @MarcoPereira7 , Unfortunately, it's not configurable at this time. I'll mark your question as a enhancement so that we can discuss it in our meeting for a possible future feature. Thanks.

ivanmatmati avatar Jan 12 '24 09:01 ivanmatmati

Hey @ivanmatmati , that's unfortunate, thank you for the answer!

MarcoPereira7 avatar Jan 12 '24 09:01 MarcoPereira7

I'm also interested in this feature, as our usecase uses a cloud-provided loadbalancer that internally uses haproxy

ShadowJonathan avatar Mar 07 '24 11:03 ShadowJonathan

One alternative i found is https://github.com/haproxytech/kubernetes-ingress/blob/master/documentation/annotations.md#proxy-protocol

ShadowJonathan avatar Mar 07 '24 12:03 ShadowJonathan