Change to use ESIPP first class fields and update comments

This commit is contained in:
Zihong Zheng
2017-05-07 18:30:40 +02:00
parent 12277a0ad4
commit 7ed716a997
6 changed files with 27 additions and 33 deletions

View File

@@ -1069,7 +1069,7 @@ func (proxier *Proxier) syncProxyRules(reason syncReason) {
svcXlbChain := serviceLBChainName(svcNameString, protocol)
if svcInfo.onlyNodeLocalEndpoints {
// Only for services with the externalTraffic annotation set to OnlyLocal
// Only for services request OnlyLocal traffic
// create the per-service LB chain, retaining counters if possible.
if lbChain, ok := existingNATChains[svcXlbChain]; ok {
writeLine(natChains, lbChain)
@@ -1385,7 +1385,7 @@ func (proxier *Proxier) syncProxyRules(reason syncReason) {
continue
}
// Now write ingress loadbalancing & DNAT rules only for services that have a localOnly annotation
// Now write ingress loadbalancing & DNAT rules only for services that request OnlyLocal traffic.
// TODO - This logic may be combinable with the block above that creates the svc balancer chain
localEndpoints := make([]*endpointsInfo, 0)
localEndpointChains := make([]utiliptables.Chain, 0)