From 647edfd6ed7afe4c36e4dc30c1eff3eeea7a15bb Mon Sep 17 00:00:00 2001 From: Hong Zhiguo Date: Fri, 13 Jul 2018 13:00:50 +0800 Subject: [PATCH] only add local endpoints into the hairpin ipset --- pkg/proxy/ipvs/proxier.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/proxy/ipvs/proxier.go b/pkg/proxy/ipvs/proxier.go index a0012c73bc..b6e416fb0e 100644 --- a/pkg/proxy/ipvs/proxier.go +++ b/pkg/proxy/ipvs/proxier.go @@ -761,6 +761,9 @@ func (proxier *Proxier) syncProxyRules() { glog.Errorf("Failed to cast BaseEndpointInfo %q", e.String()) continue } + if !ep.IsLocal { + continue + } epIP := ep.IP() epPort, err := ep.Port() // Error parsing this endpoint has been logged. Skip to next endpoint.