Skip to content
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

Fix route deletion for Service ClusterIP and LoadBalancerIP #4711

Merged
merged 1 commit into from
Mar 17, 2023

Commits on Mar 17, 2023

  1. Fix route deletion for Service ClusterIP and LoadBalancerIP

    When proxyAll is enabled, AntreaProxy needs to install routes in the
    host network namespace to redirect traffic to OVS for load balancing.
    For a Service with multiple ports, multiple ServicePorts are generated
    and processed. The previous code installed the route for a ClusterIP or
    a LoadBalancerIP multiple times when such a Service was created, and
    uninstalled the route multiple times when it was deleted, leading to a
    few problems.
    
    This patch adds a serviceIPRouteReferences which tracks the references
    of Service IPs' routes. The key is the Service IP and the value is the
    the set of ServiceInfo strings. With the references, we install a route
    exactly once as long as it's used by any ServicePorts and uninstall it
    exactly once when it's no longer used by any ServicePorts.
    
    This patch also fixes an issue that the route for ClusterIP was not
    removed on Windows Nodes after the Service was removed.
    
    Fixes antrea-io#4361
    
    Signed-off-by: Quan Tian <[email protected]>
    tnqn committed Mar 17, 2023
    Configuration menu
    Copy the full SHA
    cb963ff View commit details
    Browse the repository at this point in the history