Skip to content

Commit 65ac87d

Browse files
committed
fix(ecmp_vip.go): non-local service advertisement
With advertiseService set to false by default, it means that it won't ever get re-evaluated if the service isn't a local host and will ALWAYS result in withdrawing the VIPs which is incorrect. It needs to default to true, and only override the boolean if serviceLocal is set to true.
1 parent d780687 commit 65ac87d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/controllers/routing/ecmp_vip.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ func (nrc *NetworkRoutingController) getLoadBalancerIPs(svc *v1core.Service) []s
366366

367367
func (nrc *NetworkRoutingController) getChangedVIPs(oldSvc, newSvc *v1core.Service,
368368
onlyActiveEndpoints bool) ([]string, []string, error) {
369-
advertiseService := false
369+
advertiseService := true
370370

371371
_, hasLocalAnnotation := newSvc.Annotations[svcLocalAnnotation]
372372
hasLocalTrafficPolicy := newSvc.Spec.ExternalTrafficPolicy == v1core.ServiceExternalTrafficPolicyTypeLocal

0 commit comments

Comments
 (0)