-
Notifications
You must be signed in to change notification settings - Fork 470
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
Fix: Add Route Reconciliation #1749
base: master
Are you sure you want to change the base?
Commits on Nov 11, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 6dd7a92 - Browse repository at this point
Copy the full SHA 6dd7a92View commit details -
feat(NRC): route reconciliation
Add a route reconciliation step to the host_route_sync file that uses the BGP state table as a system of record for the routes that should or should not be synced to the system. In theory, kube-router should be consistently informed of route changes via BGP Path change events that are sent to us from GoBGP. However, in practice it seems that some routes are getting stuck in our state table.
Configuration menu - View commit details
-
Copy full SHA for 20b2639 - Browse repository at this point
Copy the full SHA 20b2639View commit details -
Configuration menu - View commit details
-
Copy full SHA for ef71110 - Browse repository at this point
Copy the full SHA ef71110View commit details -
feat: add health check to host route sync
Host route syncing is an important part of kube-router that is run in its own goroutine, so we should be checking it for health the way we do the major controllers to make sure that it never stops functioning. Additionally, as the health check controller has been continuously added on to, we also make some modifications here to make it a bit more robust and scalable.
Configuration menu - View commit details
-
Copy full SHA for 505d0c3 - Browse repository at this point
Copy the full SHA 505d0c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 943cc0d - Browse repository at this point
Copy the full SHA 943cc0dView commit details -
fix(host_route_sync.go): track changed routes in checkCacheAgainstBGP()
In addition to added / removed routes, there is also the chance that the gateway has changed and we need to track that as well by fixing the cache state.
Configuration menu - View commit details
-
Copy full SHA for 83ffcd4 - Browse repository at this point
Copy the full SHA 83ffcd4View commit details -
Configuration menu - View commit details
-
Copy full SHA for c6542c0 - Browse repository at this point
Copy the full SHA c6542c0View commit details -
fix(host_route_sync.go): check relevant path attributes
We don't want to add paths that are either not the Best path, which is something that we get for free on the BGP Watch method that we have in the NRC, or paths that are currently being withdrawn (even though this should be an edge case).
Configuration menu - View commit details
-
Copy full SHA for c129fb0 - Browse repository at this point
Copy the full SHA c129fb0View commit details -
fix(host_route_sync.go): check against primary IP
In a List operation, we get our own routes that we've advertised. This was a problem that we didn't have with BGP Watches. However, this now affects us, so we need to remove IPs that represent ourselves, so that we don't add needless routes.
Configuration menu - View commit details
-
Copy full SHA for 23c9e19 - Browse repository at this point
Copy the full SHA 23c9e19View commit details -
feat(linux_routes.go): add a boolean to InjectRoute()
Adding a boolean to the return values of InjectRoute() allows us to track when a route is actually inserted vs. when it was called. This helps us better represent HostRoutesStaleAddedCounter metric. Without this, the administrator will see a bunch of routes seemingly being added every time we call checkCacheAgainstBGP() when, in fact, most of them are tossed out depending on the user's mesh subnet settings.
Configuration menu - View commit details
-
Copy full SHA for 43e44fd - Browse repository at this point
Copy the full SHA 43e44fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for a27e751 - Browse repository at this point
Copy the full SHA a27e751View commit details
Commits on Nov 16, 2024
-
fix(InjectRoute): ensure routes is removed from map
There are a couple of items that have typically ended up in a no-op for us when considering routes to inject. However, now that we have a route map where we track route state, we need this not just to be no-ops, but also update the route state cache as well to ensure that the route doesn't get replaced in the future. When we find tunnels to clean up, we need to not only remove the tunnel and the route to that tunnel, but also remove the route from the state map. When we discover that no route needs to be added to the host because it's not in the same subnet and we weren't supposed to create a tunnel, then we also clean it up and ensure that it isn't in our state as well.
Configuration menu - View commit details
-
Copy full SHA for 4c9fb28 - Browse repository at this point
Copy the full SHA 4c9fb28View commit details -
Configuration menu - View commit details
-
Copy full SHA for e328d0f - Browse repository at this point
Copy the full SHA e328d0fView commit details