-
Notifications
You must be signed in to change notification settings - Fork 389
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
Local traffic for multi-cluster service should be handled within OVS #4431
Comments
After a few investigation and verification, I think we may add a new table named Let's say we have a local Service When the packet goes to table ServiceLB and match the IP
@tnqn @jianjuns @wenyingd @hongliangl could you help to take a look at above new table and flows? It can work as expected, but I am not sure if there is any risk to impact existing flows. Welcome any comment or suggestion. thanks. |
After sync with @wenyingd , there is another option which might work as well. We can add a bucket with action to resubmit the packet to final group to do Endpoint selection. I will verify this change locally first.
|
Describe the problem/challenge you have
The Antrea multi-cluster enables user to access exported Service from various member clusters in a ClusterSet. A local Service's ClusterIP will be included in the multi-cluster Service's Endpoint as long as user exports a Service from the same member cluster.
When the local Service ClusterIP becomes an Endpoint of multi-cluster Service, and a Pod which is trying to access multi-cluster Service in a ClusterSet, it may talk to the Service in the same cluster. From Service access perspective, it works fine. However, this kind of traffic will do first DNAT in OVS to get the local Service's ClusterIP as destination, then go through
antrea-gw0
to uplink. It may do the second DNAT to find the true Pod Endpoint via iptables rule(if kube-proxy is enabled), or it will go back to OVS to do second DNAT to get the true Pod IP as destination(if kube-proxy is disabled and replaced by AntreaProxy). Considering the in-cluster traffic never goes out of OVS and it will always go through tunnel interface in the encap mode. We should guarantee that Antrea multi-cluster traffic also keep the same traffic path no matter it's local ClusterIP or remote ClusterIP as Endpoint.Another known impact of this issue is the tunnel_id we will use in stretched NetworkPolicy will be lost if the traffic goes out of OVS.
Describe the solution you'd like
The second DNAT should be done inside of OVS instead of going through
antrea-gw0
. The solution is not decided yet, document this issue for further discussion.The impact of this issue for stretched NetworkPolicy maybe fixed by a change from controller side. @Dyanngg may have the details.
Anything else you would like to add?
The text was updated successfully, but these errors were encountered: