jcmoraisjr / haproxy-ingress

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

Add support for "expect-proxy level4" for a list of CIDRs #996

Open kayrus opened 1 year ago

kayrus commented 1 year ago

What are you trying to do

k8s nodes routes loadbalancer traffic locally. if the listener is configured with PROXY protocol, the local traffic becomes unusable since haproxy requires the PROXY header.

See the k8s issue: https://github.com/kubernetes/kubernetes/issues/66607

What HAProxy Ingress should do or how it should behave differently

instead of the bind's accept-proxy option, it's possible to configure tcp-request connection expect-proxy layer4 if { src 192.168.1.0/24 }. see documentation for reference: https://docs.haproxy.org/2.4/configuration.html#4.2-tcp-request%20connection

haproxytech ingress controller already supports the expect-proxy with a list of CIDRs: https://www.haproxy.com/documentation/kubernetes/latest/community/configuration-reference/configmap/#proxy-protocol

https://github.com/haproxytech/kubernetes-ingress/commit/8c898cb3959d1d170e902dcb932057e4e686d85e

github-actions[bot] commented 1 year ago

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