Merge pull request #54972 from m1093782566/ipvs-ipv6
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>. clean up legacy ipv4/32 in ipvs proxy **What this PR does / why we need it**: clean up legacy ipv4/32 in ipvs proxy **Which issue(s) this PR fixes**: closes #51866 **Special notes for your reviewer**: **Release note**: ```release-note NONE ``` /sig network /area ipv6 /assign @thockin cc @danehans
This commit is contained in:
		| @@ -999,7 +999,7 @@ func (proxier *Proxier) syncProxyRules() { | |||||||
| 			"-A", string(kubeServicesChain), | 			"-A", string(kubeServicesChain), | ||||||
| 			"-m", "comment", "--comment", fmt.Sprintf(`"%s cluster IP"`, svcNameString), | 			"-m", "comment", "--comment", fmt.Sprintf(`"%s cluster IP"`, svcNameString), | ||||||
| 			"-m", protocol, "-p", protocol, | 			"-m", protocol, "-p", protocol, | ||||||
| 			"-d", fmt.Sprintf("%s/32", svcInfo.clusterIP.String()), | 			"-d", utilproxy.ToCIDR(svcInfo.clusterIP), | ||||||
| 			"--dport", strconv.Itoa(svcInfo.port), | 			"--dport", strconv.Itoa(svcInfo.port), | ||||||
| 		) | 		) | ||||||
| 		if proxier.masqueradeAll { | 		if proxier.masqueradeAll { | ||||||
| @@ -1090,7 +1090,7 @@ func (proxier *Proxier) syncProxyRules() { | |||||||
| 						"-A", string(kubeServicesChain), | 						"-A", string(kubeServicesChain), | ||||||
| 						"-m", "comment", "--comment", fmt.Sprintf(`"%s loadbalancer IP"`, svcNameString), | 						"-m", "comment", "--comment", fmt.Sprintf(`"%s loadbalancer IP"`, svcNameString), | ||||||
| 						"-m", string(svcInfo.protocol), "-p", string(svcInfo.protocol), | 						"-m", string(svcInfo.protocol), "-p", string(svcInfo.protocol), | ||||||
| 						"-d", fmt.Sprintf("%s/32", ingress.IP), | 						"-d", utilproxy.ToCIDR(net.ParseIP(ingress.IP)), | ||||||
| 						"--dport", fmt.Sprintf("%d", svcInfo.port), | 						"--dport", fmt.Sprintf("%d", svcInfo.port), | ||||||
| 					) | 					) | ||||||
|  |  | ||||||
| @@ -1107,7 +1107,7 @@ func (proxier *Proxier) syncProxyRules() { | |||||||
| 					// loadbalancer's backend hosts. In this case, request will not hit the loadbalancer but loop back directly. | 					// loadbalancer's backend hosts. In this case, request will not hit the loadbalancer but loop back directly. | ||||||
| 					// Need to add the following rule to allow request on host. | 					// Need to add the following rule to allow request on host. | ||||||
| 					if allowFromNode { | 					if allowFromNode { | ||||||
| 						writeLine(proxier.natRules, append(args, "-s", fmt.Sprintf("%s/32", ingress.IP), "-j", "ACCEPT")...) | 						writeLine(proxier.natRules, append(args, "-s", utilproxy.ToCIDR(net.ParseIP(ingress.IP)), "-j", "ACCEPT")...) | ||||||
| 					} | 					} | ||||||
|  |  | ||||||
| 					// If the packet was able to reach the end of firewall chain, then it did not get DNATed. | 					// If the packet was able to reach the end of firewall chain, then it did not get DNATed. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Kubernetes Submit Queue
					Kubernetes Submit Queue