add some comment message
This commit is contained in:
parent
ac1cd3dcb4
commit
8b16d66b46
@ -962,7 +962,7 @@ func (proxier *Proxier) syncProxyRules() {
|
|||||||
// (because the socket might open but it would never work).
|
// (because the socket might open but it would never work).
|
||||||
addresses, err := utilproxy.GetNodeAddresses(proxier.nodePortAddresses, proxier.networkInterfacer)
|
addresses, err := utilproxy.GetNodeAddresses(proxier.nodePortAddresses, proxier.networkInterfacer)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Errorf("Failed to get node ip address matching nodeport cidr")
|
glog.Errorf("Failed to get node ip address matching nodeport cidr: %v", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -976,6 +976,7 @@ func (proxier *Proxier) syncProxyRules() {
|
|||||||
Protocol: protocol,
|
Protocol: protocol,
|
||||||
}
|
}
|
||||||
lps = append(lps, lp)
|
lps = append(lps, lp)
|
||||||
|
// If we encounter a zero CIDR, then there is no point in processing the rest of the addresses.
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
lp := utilproxy.LocalPort{
|
lp := utilproxy.LocalPort{
|
||||||
@ -987,6 +988,7 @@ func (proxier *Proxier) syncProxyRules() {
|
|||||||
lps = append(lps, lp)
|
lps = append(lps, lp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For ports on node IPs, open the actual port and hold it.
|
||||||
for _, lp := range lps {
|
for _, lp := range lps {
|
||||||
if proxier.portsMap[lp] != nil {
|
if proxier.portsMap[lp] != nil {
|
||||||
glog.V(4).Infof("Port %s was open before and is still needed", lp.String())
|
glog.V(4).Infof("Port %s was open before and is still needed", lp.String())
|
||||||
|
@ -987,7 +987,7 @@ func (proxier *Proxier) syncProxyRules() {
|
|||||||
if svcInfo.NodePort != 0 {
|
if svcInfo.NodePort != 0 {
|
||||||
addresses, err := utilproxy.GetNodeAddresses(proxier.nodePortAddresses, proxier.networkInterfacer)
|
addresses, err := utilproxy.GetNodeAddresses(proxier.nodePortAddresses, proxier.networkInterfacer)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Errorf("Failed to get node ip address matching nodeport cidr")
|
glog.Errorf("Failed to get node ip address matching nodeport cidr: %v", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1001,6 +1001,7 @@ func (proxier *Proxier) syncProxyRules() {
|
|||||||
Protocol: protocol,
|
Protocol: protocol,
|
||||||
}
|
}
|
||||||
lps = append(lps, lp)
|
lps = append(lps, lp)
|
||||||
|
// If we encounter a zero CIDR, then there is no point in processing the rest of the addresses.
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
lp := utilproxy.LocalPort{
|
lp := utilproxy.LocalPort{
|
||||||
@ -1012,6 +1013,7 @@ func (proxier *Proxier) syncProxyRules() {
|
|||||||
lps = append(lps, lp)
|
lps = append(lps, lp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For ports on node IPs, open the actual port and hold it.
|
||||||
for _, lp := range lps {
|
for _, lp := range lps {
|
||||||
if proxier.portsMap[lp] != nil {
|
if proxier.portsMap[lp] != nil {
|
||||||
glog.V(4).Infof("Port %s was open before and is still needed", lp.String())
|
glog.V(4).Infof("Port %s was open before and is still needed", lp.String())
|
||||||
|
Loading…
Reference in New Issue
Block a user