Skip to content

loadbalancer: implement Hybrid-DSR using the annotation-based dispatch mode #41690

@julianwiedmann

Description

@julianwiedmann

Background:
The initial DSR implementation supports a "Hybrid" mode - where TCP services are accessed via DSR, and UDP services use SNAT.
Later we also introduced an annotation-based mode, where an annotation on the Service resource determines whether this Service is DSR-enabled. The datapath ends up checking the SVC_FLAG_FWD_MODE_DSR flag for all service entries.

Proposal:
Instead of maintaining two datapath parts for such "selective" DSR modes, re-use the annotation-based infrastructure to implement Hybrid-DSR. When Hybrid-DSR is enabled, have the controlplane set the SVC_FLAG_FWD_MODE_DSR flag for all TCP frontend entries. Respect this flag in the datapath, and remove any L4 proto-specific differentiation.

Metadata

Metadata

Labels

area/datapathImpacts bpf/ or low-level forwarding details, including map management and monitor messages.area/kprAnything related to our kube-proxy replacement.area/loadbalancingImpacts load-balancing and Kubernetes service implementationsfeature/dsrRelates to Cilium's Direct-Server-Return feature for KPR.kind/enhancementThis would improve or streamline existing functionality.kind/tech-debtTechnical debtpinnedThese issues are not marked stale by our issue bot.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions