mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Merge pull request #101358 from sbangari/localendpointrefcount
Ref counting is only applicable to Remote endpoints
This commit is contained in:
commit
73c1b2e260
@ -354,7 +354,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
|
||||
@ -1157,10 +1157,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 New Issue
Block a user