-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EgressGW cleanups #21719
EgressGW cleanups #21719
Conversation
/test |
0c958fc
to
969199a
Compare
/test-1.25-net-next |
/test |
CI failures in |
Move most of the Egress Gateway-specific code into its header file, so that readers don't have to concern themselves with all the details. Fixes: cilium#19785 Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
encap_and_redirect_with_nodeid() doesn't do any tunnel lookup. Consequently it also doesn't return DROP_NO_TUNNEL_ENDPOINT. None of the callers is trying to handle such an error either, so this was presumably just a copy&paste typo. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
In a direct-routing config, we don't actually require the TUNNEL_MAP for EgressGW. In the from-container path, handle_ipv4_from_lxc() gets the tunnel_endpoint from the EgressGW policy (and can trust that it's != 0). So extract an optimized __encap_and_redirect_lxc() that doesn't depend on TUNNEL_MAP. In the reply path, rev_nodeport_lb4() queries the IPCache to obtain the source node of an EgressGW connection. If that fails, there's no further fallback to the TUNNEL_MAP. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
969199a
to
c9a825c
Compare
/test Job 'Cilium-PR-K8s-1.23-kernel-5.4' failed: Click to show.Test Name
Failure Output
If it is a flake and a GitHub issue doesn't already exist to track it, comment |
/test-1.23-5.4 |
Travis fail is #21730. |
@jibi - as discussed offline. Slightly changed the helper layout, so that they focus on wrapping the call to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks! Just a couple more nits that can be addressed when we touch again this logic
This pulls various pieces of EgressGW code into
egress_policies.h
. We also clean up the unused dependency onTUNNEL_MAP
.Fixes: #19785