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

Automated cherry pick of #5017: Avoid ServiceCIDR flapping on agent start #5495: Do not apply Egress to traffic destined for ServiceCIDRs #5530

Commits on Sep 26, 2023

  1. Avoid ServiceCIDR flapping on agent start

    The previous implementation always generated intermediate values for
    ServiceCIDR on agent start, which may interrupt the Service traffic and
    causes difficulty for cleaning up stale routes as the value calculated
    at one point may not be reliable to identify all stale routes.
    
    This commit waits for the Service Informer to be synced first,
    and calculates the ServiceCIDR based on all Services. Ideally the
    Service route won't change in most cases, and hence avoid the above
    issues.
    
    Besides, it fixes an issue that stale routes on Linux were not cleaned
    up correctly due to incorrect check.
    
    Signed-off-by: Quan Tian <qtian@vmware.com>
    tnqn authored and xliuxu committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    bc08da7 View commit details
    Browse the repository at this point in the history
  2. Do not apply Egress to traffic destined for ServiceCIDRs

    When AntreaProxy is asked to skip some Services or is not running at
    all, Pod-to-Service traffic would be forwarded to Egress Node and be
    load-balanced remotely, as opposed to locally, which could incur
    performance issue and unexpected behaviors.
    
    This patch installs flows to prevent traffic destined for ServiceCIDRs
    from being SNAT'd.
    
    Signed-off-by: Quan Tian <qtian@vmware.com>
    tnqn authored and xliuxu committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    41b469d View commit details
    Browse the repository at this point in the history