mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 10:20:51 +00:00
Moved counting logic to accommodate rebase
This commit is contained in:
parent
61b7e6c49c
commit
6454248b6b
@ -1999,6 +1999,14 @@ func (proxier *Proxier) syncEndpoint(svcPortName proxy.ServicePortName, onlyNode
|
||||
// Traffic from an external source will be routed but the reply
|
||||
// will have the POD address and will be discarded.
|
||||
endpoints = clusterEndpoints
|
||||
|
||||
if svcInfo.InternalPolicyLocal() && utilfeature.DefaultFeatureGate.Enabled(features.ServiceInternalTrafficPolicy) {
|
||||
proxier.serviceNoLocalEndpointsInternal.Insert(svcPortName.NamespacedName.String())
|
||||
}
|
||||
|
||||
if svcInfo.ExternalPolicyLocal() {
|
||||
proxier.serviceNoLocalEndpointsExternal.Insert(svcPortName.NamespacedName.String())
|
||||
}
|
||||
}
|
||||
} else {
|
||||
endpoints = clusterEndpoints
|
||||
@ -2009,15 +2017,6 @@ func (proxier *Proxier) syncEndpoint(svcPortName proxy.ServicePortName, onlyNode
|
||||
for _, epInfo := range endpoints {
|
||||
newEndpoints.Insert(epInfo.String())
|
||||
}
|
||||
if onlyNodeLocalEndpoints && len(newEndpoints) == 0 {
|
||||
if svcInfo.InternalPolicyLocal() && utilfeature.DefaultFeatureGate.Enabled(features.ServiceInternalTrafficPolicy) {
|
||||
proxier.serviceNoLocalEndpointsInternal.Insert(svcPortName.NamespacedName.String())
|
||||
}
|
||||
|
||||
if svcInfo.ExternalPolicyLocal() {
|
||||
proxier.serviceNoLocalEndpointsExternal.Insert(svcPortName.NamespacedName.String())
|
||||
}
|
||||
}
|
||||
|
||||
// Create new endpoints
|
||||
for _, ep := range newEndpoints.List() {
|
||||
|
Loading…
Reference in New Issue
Block a user