-
Notifications
You must be signed in to change notification settings - Fork 3.4k
bgpv1: Add bgp/routes
API endpoint and cilium bgp routes
CLI command
#27182
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
Conversation
3120b5c
to
66b0dd2
Compare
bgp/routes
API endpoint and cilium bgp routes
CLIbgp/routes
API endpoint and cilium bgp routes
CLI command
/test |
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.
@rastislavs One small wording nit, otherwise LGTM for docs
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.
Changes look good to me. It might be useful to add this command to the bugtool output so the info is available in sysdumps.
66b0dd2
to
1ffd29b
Compare
a5b8191
to
428daf9
Compare
Added into bugtool (as well as the previously existing "cilium bgp peers" command). Realized that we need to properly handle cases when BGP Control Plane is not enabled, so fixed that in 04acf9f. |
428daf9
to
3443810
Compare
/test |
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.
LGTM for docs
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.
Few comments, overall looks good. There are few follow ups, maybe tasks can be created for them
- Extend this to cilium-cli
- Paging of the result, as it can be very large (order of 10k).
- Some optimization for later ( getting result concurrently from various vrouters - gobgp instances )
Add a new API endpoint bgp/routes to retrieve BGP CPlane's RIB from API. The actual implementation will be in subsequent commits. Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com> Co-authored-by: Rastislav Szabo <rastislav.szabo@isovalent.com>
3443810
to
46bc64f
Compare
Implement bgp/routes API by wiring-up API call with BGPRouterManager. Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com> Co-authored-by: Rastislav Szabo <rastislav.szabo@isovalent.com>
Implement `cilium bgp routes` command that retrieves routes from bgp/routes API and displays response. Also allow using "peer" and "neighbor" keyword interchangeably in bgp CLI (e.g. "cilium bgp peers" == "cilium bgp neighbors", "cilium bgp routes ... peer 172.0.0.1" == "cilium bgp routes ... neighbor 172.0.0.1"). Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com> Co-authored-by: Rastislav Szabo <rastislav.szabo@isovalent.com>
Fixes an issue with bgp/peers & bgp/routes API endpoint and cilium "bgp peers" & "bgp routes" CLI command when BGP Control Plane is disabled. Instead of returning an internal server error returns an specific error that can be properly handled in the CLI command code. Signed-off-by: Rastislav Szabo <rastislav.szabo@isovalent.com>
Includes "cilium bgp peers" & "cilium bgp routes" command outputs in the bugtool so that BGP info is available in sysdumps. Signed-off-by: Rastislav Szabo <rastislav.szabo@isovalent.com>
46bc64f
to
3875997
Compare
I have created an overarching follow-up task with potential enhancements: #27420 |
/test |
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.
Thank you!! LGTM
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.
A couple of nits for API and CLI.
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.
Approve for API and CLI
Due to the merge of cilium#27182 before cilium#27285 a bug was introduced in pkg/bgpv1/manager/manager_test.go. This commit fixes the issue. Signed-off-by: Louis DeLosSantos <louis.delos@isovalent.com>
We may want to mark this |
makes sense, marked as |
Adds a new
bgp/routes
API endpoint and thecilium bgp routes
CLI command implementation that can be used for retrieval of available/advertised routes from BGP Control Plane's RIBs.Example usage:
Available
ipv4 unicast
routes:ipv4 unicast
routes advertised to the peer172.0.0.1
:Available ipv4 unicast routes in virtual router with ASN
65001
:Help: