mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +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() {
|
func (ep *endpointsInfo) Cleanup() {
|
||||||
Log(ep, "Endpoint Cleanup", 3)
|
Log(ep, "Endpoint Cleanup", 3)
|
||||||
if ep.refCount != nil {
|
if !ep.GetIsLocal() && ep.refCount != nil {
|
||||||
*ep.refCount--
|
*ep.refCount--
|
||||||
|
|
||||||
// Remove the remote hns endpoint, if no service is referring it
|
// Remove the remote hns endpoint, if no service is referring it
|
||||||
@ -1157,10 +1157,10 @@ func (proxier *Proxier) syncProxyRules() {
|
|||||||
} else {
|
} else {
|
||||||
// We only share the refCounts for remote endpoints
|
// We only share the refCounts for remote endpoints
|
||||||
ep.refCount = proxier.endPointsRefCount.getRefCount(newHnsEndpoint.hnsID)
|
ep.refCount = proxier.endPointsRefCount.getRefCount(newHnsEndpoint.hnsID)
|
||||||
|
*ep.refCount++
|
||||||
}
|
}
|
||||||
|
|
||||||
ep.hnsID = newHnsEndpoint.hnsID
|
ep.hnsID = newHnsEndpoint.hnsID
|
||||||
*ep.refCount++
|
|
||||||
|
|
||||||
Log(ep, "Endpoint resource found", 3)
|
Log(ep, "Endpoint resource found", 3)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user