feat(srv6): SRv6-native (DSR) ClusterIP Services#1043
Open
ryskn wants to merge 1 commit into
Open
Conversation
f52ded1 to
29cbaed
Compare
Collaborator
|
/codebuild_run(29cbaed) |
Collaborator
|
CI complains with the following errors: @ryskn Can you please run |
Replace cnat DNAT/un-DNAT with Direct Server Return for pod-backed ClusterIP services in the SRv6 data path. Traffic keeps dst=VIP end to end; backend pods accept the VIP on lo and reply from it, so no reverse translation is needed and the cross-node SRv6 un-DNAT failure disappears. Source IP is preserved (no SNAT). - config: SRv6NativeServicesEnabled feature gate + vppSRv6Native annotation - services: classify eligible ClusterIP services (gate + annotation + ClusterIP + port==targetPort), skip cnat, publish DSRService events, reconcile-based diff/withdraw - connectivity/SRv6: per-service ECMP SR policy over backend nodes' End.DT6 SIDs + steering; decap into PodVRF via sw_if_index; reconcile with retain-on-failure retry and periodic re-reconcile - cni: bind VIP on local backend pods (lo) + uRPF allow + PodVRF ECMP delivery route; per-pod cleanup tracking; reconcile on pod add/del Experimental; requires SRv6Enabled. Other services (NodePort/External, port-remapped, host-network backed) keep the cnat path. Signed-off-by: Ryosuke Nakayama <ryosuke.nakayama@ryskn.com>
Contributor
Author
|
thanks! |
Collaborator
|
/codebuild_run(c146809) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an opt-in SRv6-native data path for pod-backed ClusterIP Services that
uses Direct Server Return (DSR) instead of cnat.
In an IPv6 single-stack + SRv6 setup, cross-node pod-backed ClusterIP Services
break: cnat's reverse session lives in the main FIB and the
cnat-lookupinputarc never runs on the SRv6-decapped inner packet, so the reply is never
un-DNAT'd (the SYN-ACK keeps the backend Pod IP → client RST). This is the
pod-backed counterpart of the host-network case fixed in #1028.
Approach
Rather than make cnat compose with SRv6, steer the VIP over SRv6 and let the
backend accept it directly (DSR): the inner packet keeps
dst=VIPend to endand the backend replies with
src=VIP, so no reverse translation is needed.Source IP is preserved.
srv6NativeServicesEnabled+ Service annotationcni.projectcalico.org/vppSRv6Native: "true". Eligible = ClusterIP, all portsport==targetPort, pod-backed. host-network / port-remapped / External-LBServices keep the cnat path.
End.DT6SIDs + steering;backends bind the VIP and are allowed through uRPF; PodVRF delivery route.
Reconcile-based, no NAT on the path.
Verified end to end on an IPv6 single-stack cluster: cross-node client reaches
the VIP with no cnat, no RST, and the client source IP preserved.