mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-06-09 00:34:10 -04:00
Merge pull request #101999 from sbangari/automated-cherry-pick-of-#101358-upstream-release-1.19
Automated cherry pick of #101358: Ref counting is only applicable to Remote endpoints
This commit is contained in:
commit
401d6d3f6b
1 changed files with 2 additions and 2 deletions
|
|
@ -317,7 +317,7 @@ func newSourceVIP(hns HostNetworkService, network string, ip string, mac string,
|
|||
|
||||
func (ep *endpointsInfo) Cleanup() {
|
||||
Log(ep, "Endpoint Cleanup", 3)
|
||||
if ep.refCount != nil {
|
||||
if !ep.GetIsLocal() && ep.refCount != nil {
|
||||
*ep.refCount--
|
||||
|
||||
// Remove the remote hns endpoint, if no service is referring it
|
||||
|
|
@ -1112,10 +1112,10 @@ func (proxier *Proxier) syncProxyRules() {
|
|||
} else {
|
||||
// We only share the refCounts for remote endpoints
|
||||
ep.refCount = proxier.endPointsRefCount.getRefCount(newHnsEndpoint.hnsID)
|
||||
*ep.refCount++
|
||||
}
|
||||
|
||||
ep.hnsID = newHnsEndpoint.hnsID
|
||||
*ep.refCount++
|
||||
|
||||
Log(ep, "Endpoint resource found", 3)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue