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

Rust ControlPlane: TCPRoute and UDPRoute Support #303

Open
4 tasks
shaneutt opened this issue Oct 29, 2024 · 0 comments
Open
4 tasks

Rust ControlPlane: TCPRoute and UDPRoute Support #303

shaneutt opened this issue Oct 29, 2024 · 0 comments
Assignees
Labels
area/controlplane area/dataplane priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@shaneutt
Copy link
Member

We had a TCPRoute and UDPRoute controller in our previous Golang-based control-plane. The purpose of this task is to add controllers for these types into our new Rust control-plane.

However, as we are preparing to implement the Service API we probably do not want to build discrete controllers for this as TCPRoute, UDPRoute and Service will have common data. Instead we should build more generic tooling for converting these types which can help support the eventual Service implementation.

TODO

  • Create a common library for converting routing APIs to our data-plane API
  • Implement a UDPRoute controller utilizing the above library
  • Implement a TCPRoute controller utilizing the above library
  • Create integration tests which match our previously Golang-based tests for UDPRoute and TCPRoute

Additional Thoughts

For the library component I suggest that we create direct conversions of TCPRoute and UDPRoute to the types available in backend.rs. We may in fact need some higher level type that wraps those types. With that higher level type, we could implement From conversions for TCPRoute and UDPRoute. In this model, the controller workflow might be something like:

  1. ingest the resource from the API
  2. check the Gateway and GatewayClass to validate this is a managed route
  3. any additional validation needed to avoid side-effects
  4. pass off the TCPRoute or UDPRoute to the new library described above, allowing the conversion to take place and then operating generically to update the data-plane thereafter.

One additional side benefit of the above is that when we implement the Service API later we may be able to implement a From for Service as well and reduce how much new code needs to exist to implement that API (though, Service does some additional stuff so... it will likely have a lot of it's own isms).

Note: This is just a suggestion. If there end up being some difficulties or generally good reasons not to do this, no sweat.

@shaneutt shaneutt moved this to Backlog in Blixt Project Board Oct 29, 2024
@shaneutt shaneutt moved this from Backlog to Next in Blixt Project Board Oct 29, 2024
@shaneutt shaneutt added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controlplane area/dataplane priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
Status: In Progress
Development

No branches or pull requests

2 participants