Changed usage of NodeLocal* to *PolicyLocal

This commit is contained in:
Max Renaud 2022-03-31 18:55:47 +00:00
parent 198367a486
commit 61b7e6c49c

View File

@ -2010,11 +2010,11 @@ func (proxier *Proxier) syncEndpoint(svcPortName proxy.ServicePortName, onlyNode
newEndpoints.Insert(epInfo.String())
}
if onlyNodeLocalEndpoints && len(newEndpoints) == 0 {
if svcInfo.NodeLocalInternal() && utilfeature.DefaultFeatureGate.Enabled(features.ServiceInternalTrafficPolicy) {
if svcInfo.InternalPolicyLocal() && utilfeature.DefaultFeatureGate.Enabled(features.ServiceInternalTrafficPolicy) {
proxier.serviceNoLocalEndpointsInternal.Insert(svcPortName.NamespacedName.String())
}
if svcInfo.NodeLocalExternal() {
if svcInfo.ExternalPolicyLocal() {
proxier.serviceNoLocalEndpointsExternal.Insert(svcPortName.NamespacedName.String())
}
}