mirror of https://github.com/k3s-io/k3s
Merge pull request #56037 from m1093782566/cleanup-deadcode
Automatic merge from submit-queue (batch tested with PRs 55954, 56037, 55866, 55984, 54994). 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>. remove dead code **What this PR does / why we need it**: remove dead code in IPVS kube-proxy **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 # **Special notes for your reviewer**: **Release note**: ```release-note NONE ``` /assign @thockinpull/6/head
commit
be4f638ce7
|
@ -1702,40 +1702,6 @@ func (proxier *Proxier) linkKubeServiceChain(existingNATChains map[utiliptables.
|
|||
return nil
|
||||
}
|
||||
|
||||
//// linkKubeIPSetsChain will Create chain KUBE-SVC-IPSETS and link the chin in KUBE-SERVICES
|
||||
//
|
||||
//// Chain KUBE-SERVICES (policy ACCEPT)
|
||||
//// target prot opt source destination
|
||||
//// KUBE-SVC-IPSETS all -- 0.0.0.0/0 0.0.0.0/0 match-set KUBE-SERVICE-ACCESS dst,dst
|
||||
//
|
||||
//// Chain KUBE-SVC-IPSETS (1 references)
|
||||
//// target prot opt source destination
|
||||
//// KUBE-MARK-MASQ all -- 0.0.0.0/0 0.0.0.0/0 match-set KUBE-EXTERNAL-IP dst,dst
|
||||
//// ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 match-set KUBE-EXTERNAL-IP dst,dst PHYSDEV match ! --physdev-is-in ADDRTYPE match src-type !LOCAL
|
||||
//// ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 match-set KUBE-EXTERNAL-IP dst,dst ADDRTYPE match dst-type LOCAL
|
||||
//// ...
|
||||
//func (proxier *Proxier) linkKubeIPSetsChain(existingNATChains map[utiliptables.Chain]string, natChains *bytes.Buffer) error {
|
||||
// if _, err := proxier.iptables.EnsureChain(utiliptables.TableNAT, KubeServiceIPSetsChain); err != nil {
|
||||
// return fmt.Errorf("Failed to ensure that %s chain %s exists: %v", utiliptables.TableNAT, KubeServiceIPSetsChain, err)
|
||||
// }
|
||||
//
|
||||
// // TODO: iptables comment message for ipset?
|
||||
// // The hash:ip,port type of sets require two src/dst parameters of the set match and SET target kernel modules.
|
||||
// args := []string{"-m", "set", "--match-set", proxier.kubeServiceAccessSet.Name, "dst,dst", "-j", string(KubeServiceIPSetsChain)}
|
||||
// if _, err := proxier.iptables.EnsureRule(utiliptables.Prepend, utiliptables.TableNAT, kubeServicesChain, args...); err != nil {
|
||||
// return fmt.Errorf("Failed to ensure that ipset %s chain %s jumps to %s: %v", proxier.kubeServiceAccessSet.Name, kubeServicesChain, KubeServiceIPSetsChain, err)
|
||||
// }
|
||||
//
|
||||
// // equal to `iptables -t nat -N KUBE-SVC-IPSETS`
|
||||
// // write `:KUBE-SERVICES - [0:0]` in nat table
|
||||
// if chain, ok := existingNATChains[KubeServiceIPSetsChain]; ok {
|
||||
// writeLine(natChains, chain)
|
||||
// } else {
|
||||
// writeLine(natChains, utiliptables.MakeChainLine(KubeServiceIPSetsChain))
|
||||
// }
|
||||
// return nil
|
||||
//}
|
||||
|
||||
func (proxier *Proxier) createKubeFireWallChain(existingNATChains map[utiliptables.Chain]string, natChains *bytes.Buffer) error {
|
||||
// `iptables -t nat -N KUBE-FIRE-WALL`
|
||||
if _, err := proxier.iptables.EnsureChain(utiliptables.TableNAT, KubeFireWallChain); err != nil {
|
||||
|
|
Loading…
Reference in New Issue