projectcalico / calico

Cloud native networking and network security
https://docs.tigera.io/calico/latest/about/
Apache License 2.0
5.87k stars 1.31k forks source link

[Feature Request] An implementation of the gobgp client is expected to be added #7371

Open 113xiaoji opened 1 year ago

113xiaoji commented 1 year ago

Expected Behavior

Bird is written in C++, and the code is difficult to maintain. Gobgp is more cloud-native. Five years ago, gobgp was used as the default BGP implementation, but it is discarded. The solution uses gobgp as the SDK to listen to K8S configuration changes, which conflicts with the current confd-based solution. Expect to add an implementation that uses gobgp as a stand-alone executable. Configure a series of confd templates that meet the Gobgp requirements, listen to changes, generate a new configuration file, and reload the Gobgp.

Deprecated Code Repository: https://github.com/projectcalico/calico-bgp-daemon GoBGP Config: https://github.com/osrg/gobgp

Current Behavior Only the bird mode is supported.

Possible Solution

Steps to Reproduce (for bugs) Context Reduce operation / configuration complexity.

Your Environment Calico version Orchestrator version (e.g. kubernetes, mesos, rkt): Operating System and version: Link to your project (optional): @caseydavenport

caseydavenport commented 1 year ago

Gobgp is more cloud-native.

What is the basis of this claim?

Five years ago, gobgp was used as the default BGP implementation, but it is discarded

GoBGP was never the default implementation for Calico - we added it as an optional, experimental alternative to BIRD. We found it to have some bugs, and scalability / performance issues compared to BIRD. That may have changed by now, though.

What is your use-case for an alternative BGP agent? Is there some feature you're looking for that GoBGP offers that BIRD doesn't? Without that, it's hard to make a case to implement this.

113xiaoji commented 1 year ago

Thank you for your reply. The reasons for using GOBGP are as follows:

  1. Gobgp is developed in the go language, which is consistent with the calico development language.
  2. The GOBGP supports the SDK mode, which facilitates service logic writing and route distribution. Instead, the function logic is defined by keywords in the TOML file.
  3. Currently, cilium also supports gobgp. For details, see https://docs.cilium.io/en/latest/network/bgp-control-plane/.
  4. Using gobgp does not require additional maintenance of more than 50,000 lines of bird's c code.
  5. Bird has not released a new version for five years. Some companies consider that it has reached the end of marketing (EOM). Therefore, Bird cannot be used as a third-party software. @caseydavenport
frozenprocess commented 1 year ago
  1. I believe bird 2.0.12 was released in 23.1.2023
113xiaoji commented 1 year ago
  1. I believe bird 2.0.12 was released in 23.1.2023

I would like to ask what the relationship between these two repo is.,Which of the following is used for bird release? https://github.com/projectcalico/bird and https://bird.network.cz/?download

113xiaoji commented 1 year ago
  1. I believe bird 2.0.12 was released in 23.1.2023 I checked the dockerfile and it appears that we are using our own bird compiled docker image.

ARG BIRD_IMAGE=calico/bird:latest ARG UBI_IMAGE

FROM calico/bpftool:v5.3-amd64 as bpftool FROM ${BIRD_IMAGE} as bird

frozenprocess commented 1 year ago

I would like to ask what the relationship between these two repo is.,Which of the following is used for bird release? https://github.com/projectcalico/bird and https://bird.network.cz/?download

So as far as I can tell Calico Bird is a fork of the Original bird source code. It is a customized version that implements IP-IP and some other features tailored for Calico in order to get your SDN up and running. The last update to Calico Bird was this commit.

ARG BIRD_IMAGE=calico/bird:latest ARG UBI_IMAGE

FROM calico/bpftool:v5.3-amd64 as bpftool FROM ${BIRD_IMAGE} as bird

I believe calico/bird:latest is built locally on the machine that builds the release. To double check we could go over the docker hub bird images.