fix review comments
This commit is contained in:
parent
8b16d66b46
commit
029a16a1eb
@ -968,23 +968,19 @@ func (proxier *Proxier) syncProxyRules() {
|
|||||||
|
|
||||||
lps := make([]utilproxy.LocalPort, 0)
|
lps := make([]utilproxy.LocalPort, 0)
|
||||||
for address := range addresses {
|
for address := range addresses {
|
||||||
if utilproxy.IsZeroCIDR(address) {
|
|
||||||
lp := utilproxy.LocalPort{
|
|
||||||
Description: "nodePort for " + svcNameString,
|
|
||||||
IP: "",
|
|
||||||
Port: svcInfo.NodePort,
|
|
||||||
Protocol: protocol,
|
|
||||||
}
|
|
||||||
lps = append(lps, lp)
|
|
||||||
// If we encounter a zero CIDR, then there is no point in processing the rest of the addresses.
|
|
||||||
break
|
|
||||||
}
|
|
||||||
lp := utilproxy.LocalPort{
|
lp := utilproxy.LocalPort{
|
||||||
Description: "nodePort for " + svcNameString,
|
Description: "nodePort for " + svcNameString,
|
||||||
IP: address,
|
IP: address,
|
||||||
Port: svcInfo.NodePort,
|
Port: svcInfo.NodePort,
|
||||||
Protocol: protocol,
|
Protocol: protocol,
|
||||||
}
|
}
|
||||||
|
if utilproxy.IsZeroCIDR(address) {
|
||||||
|
// Empty IP address means all
|
||||||
|
lp.IP = ""
|
||||||
|
lps = append(lps, lp)
|
||||||
|
// If we encounter a zero CIDR, then there is no point in processing the rest of the addresses.
|
||||||
|
break
|
||||||
|
}
|
||||||
lps = append(lps, lp)
|
lps = append(lps, lp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -993,23 +993,19 @@ func (proxier *Proxier) syncProxyRules() {
|
|||||||
|
|
||||||
lps := make([]utilproxy.LocalPort, 0)
|
lps := make([]utilproxy.LocalPort, 0)
|
||||||
for address := range addresses {
|
for address := range addresses {
|
||||||
if utilproxy.IsZeroCIDR(address) {
|
|
||||||
lp := utilproxy.LocalPort{
|
|
||||||
Description: "nodePort for " + svcNameString,
|
|
||||||
IP: "",
|
|
||||||
Port: svcInfo.NodePort,
|
|
||||||
Protocol: protocol,
|
|
||||||
}
|
|
||||||
lps = append(lps, lp)
|
|
||||||
// If we encounter a zero CIDR, then there is no point in processing the rest of the addresses.
|
|
||||||
break
|
|
||||||
}
|
|
||||||
lp := utilproxy.LocalPort{
|
lp := utilproxy.LocalPort{
|
||||||
Description: "nodePort for " + svcNameString,
|
Description: "nodePort for " + svcNameString,
|
||||||
IP: address,
|
IP: address,
|
||||||
Port: svcInfo.NodePort,
|
Port: svcInfo.NodePort,
|
||||||
Protocol: protocol,
|
Protocol: protocol,
|
||||||
}
|
}
|
||||||
|
if utilproxy.IsZeroCIDR(address) {
|
||||||
|
// Empty IP address means all
|
||||||
|
lp.IP = ""
|
||||||
|
lps = append(lps, lp)
|
||||||
|
// If we encounter a zero CIDR, then there is no point in processing the rest of the addresses.
|
||||||
|
break
|
||||||
|
}
|
||||||
lps = append(lps, lp)
|
lps = append(lps, lp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user