-
Notifications
You must be signed in to change notification settings - Fork 469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
withdraw ClusterIP bgp route for externalTrafficPolicy=Local when there are no local endpoints #347
Conversation
Refs #347 |
err := nrc.bgpServer.DeletePath([]byte(nil), 0, "", pathList) | ||
|
||
if err != nil { | ||
return fmt.Errorf(err.Error()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just
return err
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you, but the AdvertiseClusterIp method above it should be refactored as well then, since the methods are structured the same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feel free to fix the method above too :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alrighty then :)
Tested this patch and it works as we expect. However, the convergence time in kube-router is taking a bit longer than I would like once the route is removed. I think this is expected if you use the default sync period (60s) |
Might be a good time to refactor to use informers so we can get the update events for endpoints right away, as opposed to listing all endpoints on each sync loop |
I agree that the convergence is not really acceptable. Ideally it should be ran immediately when there are no endpoints left on the node. |
LGTM, thanks for the PR @TvL2386 I'll try to do some work in the upcoming week to shorten the convergence time. |
Hi guys,
I noticed that when using a Service object with type: Loadbalancer and externalTrafficPolicy: Local, the routes are not withdrawn. On my external BGP peer I could still see the route which caused for dropped packets when that route was used.
This pull request withdraws routes for this externalTrafficPolicy when there are no endpoints.