don't delete KUBE-MARK-MASQ chain in iptables/ipvs proxier

This commit is contained in:
liuxu
2019-08-20 15:43:54 +08:00
parent cd5bc3c383
commit c90b295ef1
2 changed files with 15 additions and 3 deletions

View File

@@ -408,7 +408,7 @@ func CleanupLeftovers(ipt utiliptables.Interface) (encounteredError bool) {
natRules := bytes.NewBuffer(nil)
writeLine(natChains, "*nat")
// Start with chains we know we need to remove.
for _, chain := range []utiliptables.Chain{kubeServicesChain, kubeNodePortsChain, kubePostroutingChain, KubeMarkMasqChain} {
for _, chain := range []utiliptables.Chain{kubeServicesChain, kubeNodePortsChain, kubePostroutingChain} {
if _, found := existingNATChains[chain]; found {
chainString := string(chain)
writeBytesLine(natChains, existingNATChains[chain]) // flush