Hi everyone!
It's not possible to preserve source IP (client IP) when service.spec.externalTrafficPolicy is set to Cluster.
The current workaround is setting service.spec.externalTrafficPolicy to Local. But it has its own limitations:
https://developers.cloudflare.com/spectrum/proxy-protocol
service.beta.kubernetes.io/aws-load-balancer-proxy-protocol)service.kubernetes.io/ibm-load-balancer-cloud-provider-enable-features: "proxy-protocol")Unfortunately, I'm not familiar with the code base of metallb, but I've investigated a little bit and I guess we can use mmproxy (from cloudflare) or go-mmproxy (from path.net) and deploy it as a sidecar to the speaker pods, but it's just a guess and I don't know the details. Also, there might be other options as well.
+1 . That feature would be really nice to have.
Hi @alibo @m-yosefpor
A better way to preserve sourceIP is to use a CNI that support Direct Server Return, see #796.
MetalLB is controlplane only, making it part of the dataplane means we would be responsible for the performance of the system, so more bugs to fight, I personally don't see that happening.
Also Calico will soon be able to annonce LoadBalancers IP via BGP https://github.com/metallb/metallb/issues/114#issuecomment-754839513.
Most helpful comment
Hi @alibo @m-yosefpor
A better way to preserve sourceIP is to use a CNI that support Direct Server Return, see #796.
MetalLB is controlplane only, making it part of the dataplane means we would be responsible for the performance of the system, so more bugs to fight, I personally don't see that happening.
Also Calico will soon be able to annonce LoadBalancers IP via BGP https://github.com/metallb/metallb/issues/114#issuecomment-754839513.