Skip to content
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

Felix programs IPIP tunnels #8357

Open
wants to merge 50 commits into
base: master
Choose a base branch
from
Open

Conversation

mazdakn
Copy link
Member

@mazdakn mazdakn commented Dec 19, 2023

Description

Currently, it's BIRD that programs routes for IPIP encapsulation, which is unlike VXLAN|Wireguard where Felix programs the routes. This PR enables Felix to programs the IPIP routes as well, and not rely on BIRD anymore. The benefits are:

  • Not needing an extra component (i.e. BIRD) for IPIP encapsulation. Enabling Felix to program IPIP routes and not running BIRD saves some memory/CPU.
  • Allowing to get rid of Calico fork of BIRD (v1.6) which is way old. Instead we can use upstream BIRD.
  • In future, we can also make Felix program no encap routes as well. and get rid of internal BGP mesh.

This PR includes:

  • Adding support to Felix to program IPIP routes.
  • Updating BIRD templates to not export IPIP routes, i.e routes with tunl0 interface.
  • Updating BIRD templates to not program IPIP routes to kernel
  • Introducing a new value of ipip for calico_backend variable to enable IPIP encapsulation without running BIRD. bird value still enables IPIP encapsulation and also start BIRD service.

Related issues/PRs

Todos

  • Tests
  • Documentation
  • Release note

Release Note

TBD

Reminder for the reviewer

Make sure that this PR has the correct labels and milestone set.

Every PR needs one docs-* label.

  • docs-pr-required: This change requires a change to the documentation that has not been completed yet.
  • docs-completed: This change has all necessary documentation completed.
  • docs-not-required: This change has no user-facing impact and requires no docs.

Every PR needs one release-note-* label.

  • release-note-required: This PR has user-facing changes. Most PRs should have this label.
  • release-note-not-required: This PR has no user-facing changes.

Other optional labels:

  • cherry-pick-candidate: This PR should be cherry-picked to an earlier release. For bug fixes only.
  • needs-operator-pr: This PR is related to install and requires a corresponding change to the operator.

@mazdakn mazdakn added release-note-required Change has user-facing impact (no matter how small) docs-pr-required Change is not yet documented labels Dec 19, 2023
@mazdakn mazdakn requested a review from a team as a code owner December 19, 2023 23:17
@marvin-tigera marvin-tigera added this to the Calico v3.28.0 milestone Dec 19, 2023
@mazdakn mazdakn changed the title Felix programs IPIP tunnels [WIP] Felix programs IPIP tunnels Dec 19, 2023
@caseydavenport
Copy link
Member

Whooaaaa wasn't expecting this one. Sweet!

@radTuti radTuti modified the milestones: Calico v3.28.0, Calico v3.28.1 May 3, 2024
@mazdakn mazdakn modified the milestones: Calico v3.28.1, Calico v3.29.0 May 6, 2024
@mazdakn mazdakn force-pushed the felix-ipip branch 2 times, most recently from 1ba88c2 to 70d5364 Compare May 10, 2024 22:55
@mazdakn mazdakn changed the title [WIP] Felix programs IPIP tunnels Felix programs IPIP tunnels Jun 27, 2024
@mazdakn mazdakn force-pushed the felix-ipip branch 3 times, most recently from 8f35ab3 to 27c6a40 Compare June 27, 2024 23:38
Copy link
Member

@fasaxc fasaxc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a very brief skim of the felix bits. Nice to see that it's not a crazy amount of code in Felix; as we'd hoped. Before looking in more detail/at the confd stuff it'd be good to understand the design a bit better:

  • If I create a new cluster in non-bird mode it seems simple: I get felix routes and no BIRD.
  • But what if I then decide to advertise routes later? Do we disable Felix routes in favour of BIRD? How do BIRD and Felix interact?
  • Is there a way to get the exact old behaviour (i.e. disable Felix new function and let BIRD do what it always did)? I'd quite like to have that as an option in case folks are doing odd things that we don't know about! In simple cases, felix will program the same routes, but I bet some folks are peering with external nodes and doing IPIP with those external nodes!
  • How is upgrade/downgrade handled? BIRD and felix will use different protocols on their routes, will Felix overwrite a BIRD route? Will Felix clean up a BIRD route that's now no longer needed? (Doing the latter would be easier once my big RouteTable refactor PR lands since there's a way to handle special cases like that.)

4,
featureDetector,
)
dp.ipipParentC = make(chan string, 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does IPIP have the concept of a parent device? I thought that was a quirk of VXLAN. I'd expect that aspect not to be needed. Of course, if we do the IPIP device set-up in the background then we still need a kick channel but I don't think you need to send the parent device?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK, the parent device is needed to add routes to no encap routes. And for IPIP CrossSubnet we need to add no encap routes, right?

@frozenprocess
Copy link
Collaborator

looks related #5311

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-pr-required Change is not yet documented release-note-required Change has user-facing impact (no matter how small)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants