• Kubernetes Submit Queue's avatar
    Merge pull request #61329 from Lion-Wei/ipvs-esipp · 9bd6c62a
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
    
    fix externaltrafficpolicy=local related ipvs ci case
    
    **What this PR does / why we need it**:
    
    **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
    Fixes #61328
    
    **Special notes for your reviewer**:
    To realize externalTrafficPolicy=local, but do not affect traffic inside the cluster.
    If thie pr got merged, the iptables rules of ipvs proxy mode ESIPP should be like(for loadbalance case):
    ```
    Chain KUBE-FIRE-WALL (1 references)
    target     prot opt source               destination         
    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            match-set KUBE-LB-INGRESS-LOCAL dst,dst
    KUBE-MARK-MASQ  all  --  0.0.0.0/0            0.0.0.0/0            /* mark MASQ for external traffic policy not local */
    
    Chain KUBE-MARK-DROP (0 references)
    target     prot opt source               destination         
    MARK       all  --  0.0.0.0/0            0.0.0.0/0            MARK or 0x8000
    
    Chain KUBE-MARK-MASQ (3 references)
    target     prot opt source               destination         
    MARK       all  --  0.0.0.0/0            0.0.0.0/0            MARK or 0x4000
    
    Chain KUBE-NODE-PORT (1 references)
    target     prot opt source               destination         
    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            match-set KUBE-NODE-PORT-LOCAL-TCP dst
    KUBE-MARK-MASQ  all  --  0.0.0.0/0            0.0.0.0/0            /* mark MASQ for external traffic policy not local */
    
    Chain KUBE-POSTROUTING (0 references)
    target     prot opt source               destination         
    MASQUERADE  all  --  0.0.0.0/0            0.0.0.0/0            /* kubernetes service traffic requiring SNAT */ mark match 0x4000/0x4000
    MASQUERADE  all  --  0.0.0.0/0            0.0.0.0/0            match-set KUBE-LOOP-BACK dst,dst,src
    
    Chain KUBE-SERVICES (2 references)
    target     prot opt source               destination         
    KUBE-MARK-MASQ  all  -- !10.64.0.0/14         0.0.0.0/0            match-set KUBE-CLUSTER-IP dst,dst
    KUBE-FIRE-WALL  all  --  0.0.0.0/0            0.0.0.0/0            match-set KUBE-LOAD-BALANCER-MASQ dst,dst
    KUBE-NODE-PORT  tcp  --  0.0.0.0/0            0.0.0.0/0            tcp match-set KUBE-NODE-PORT-TCP dst
    ```
    
    **Release note**:
    ```release-note
    NONE
    ```
    9bd6c62a
Name
Last commit
Last update
..
testing Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
README.md Loading commit data...
ipset.go Loading commit data...
ipset_test.go Loading commit data...
netlink.go Loading commit data...
netlink_linux.go Loading commit data...
netlink_unsupported.go Loading commit data...
proxier.go Loading commit data...
proxier_test.go Loading commit data...