• Kubernetes Submit Queue's avatar
    Merge pull request #52528 from m1093782566/refactor-proxy · 9438e14d
    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>.
    
    Refactor kube-proxy service/endpoints update so that can be consumed among different proxiers
    
    **What this PR does / why we need it**:
    
    There are huge duplication among different proxiers.  For example, the service/endpoints list/watch part in iptables, ipvs and windows kernel mode(to be get in soon).
    
    I think the more places this is replicated the harder it becomes to keep correct. We may need to refactor it and let different proxiers consume the same code.
    
    **Which issue this PR fixes**: 
    
    fixes #52464
    
    **Special notes for your reviewer**:
    
    * This refactor reduces **500** Lines in iptables proxy, so it will reduce **500*N**(number of proxiers) lines in total. People no need to care the service/endpoints update logic any more and can be more focus on proxy logic.
    
    * I would like to do the following things in follow-ups:
    
    1. rsync it to ipvs proxier
    
    2. rsync it to winkernel proxier
    
    **Release note**:
    
    ```release-note
    Refactor kube-proxy service/endpoints update so that can be consumed among different proxiers
    ```
    9438e14d
Name
Last commit
Last update
..
apis/kubeproxyconfig Loading commit data...
config Loading commit data...
healthcheck Loading commit data...
iptables Loading commit data...
ipvs Loading commit data...
metrics Loading commit data...
userspace Loading commit data...
util Loading commit data...
winkernel Loading commit data...
winuserspace Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
doc.go Loading commit data...
endpoints.go Loading commit data...
endpoints_test.go Loading commit data...
service.go Loading commit data...
service_test.go Loading commit data...
types.go Loading commit data...