Skip to content

[v1.18] lb: Implement Hybrid-DSR via annotation infrastructure#43056

Merged
julianwiedmann merged 1 commit intov1.18from
pr/jwi/v1.18/dsr-hybrid-prep
Dec 2, 2025
Merged

[v1.18] lb: Implement Hybrid-DSR via annotation infrastructure#43056
julianwiedmann merged 1 commit intov1.18from
pr/jwi/v1.18/dsr-hybrid-prep

Conversation

@julianwiedmann
Copy link
Copy Markdown
Member

@julianwiedmann julianwiedmann commented Dec 1, 2025

To ensure smooth upgrades to v1.19, this picks up the controlplane change from #42788. This way all service map entries have a valid DSR yes/no flag, and the datapath can trust the flag whenever the v1.19 programs start to roll out.

@maintainer-s-little-helper maintainer-s-little-helper bot added backport/1.18 This PR represents a backport for Cilium 1.18.x of a PR that was merged to main. kind/backports This PR provides functionality previously merged into master. labels Dec 1, 2025
@julianwiedmann
Copy link
Copy Markdown
Member Author

/test

[ upstream commit 0360502 ]

[ backporter's notes: remove wildcard entries in the test, they don't
  exist on v1.18. ]

Re-implement Hybrid-DSR mode to use the same flag-based mechanism
as annotation mode, eliminating duplicate datapath logic.

Changes:
- Update ToSVCForwardingMode() to accept optional protocol parameter
- For LBModeHybrid, return DSR mode for TCP (proto 6), SNAT otherwise
- Pass protocol to ToSVCForwardingMode() in BPF reconciler
- Add tests to demonstrate that we're producing the expected frontend entries.

This allows the control plane to set SVC_FLAG_FWD_MODE_DSR on a
per-frontend basis for TCP services in Hybrid mode, while the
datapath uses the same flag-checking logic for all selective DSR
modes.

Signed-off-by: saiaunghlyanhtet <saiaunghlyanhtet2003@gmail.com>
Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
@julianwiedmann julianwiedmann force-pushed the pr/jwi/v1.18/dsr-hybrid-prep branch from b3b8c51 to 7b01450 Compare December 1, 2025 12:46
@julianwiedmann
Copy link
Copy Markdown
Member Author

/test

@julianwiedmann julianwiedmann marked this pull request as ready for review December 1, 2025 13:20
@julianwiedmann julianwiedmann requested a review from a team as a code owner December 1, 2025 13:20
@julianwiedmann julianwiedmann added this pull request to the merge queue Dec 2, 2025
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Dec 2, 2025
Merged via the queue into v1.18 with commit 9c1393d Dec 2, 2025
316 of 319 checks passed
@julianwiedmann julianwiedmann deleted the pr/jwi/v1.18/dsr-hybrid-prep branch December 2, 2025 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/1.18 This PR represents a backport for Cilium 1.18.x of a PR that was merged to main. kind/backports This PR provides functionality previously merged into master. ready-to-merge This PR has passed all tests and received consensus from code owners to merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants