Skip to content

Rust ControlPlane: Gateway API Support #303

Open
2 of 4 issues completed
Open
Feature
2 of 4 issues completed
@shaneutt

Description

@shaneutt

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 (and GatewayClass and Gateway) 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.

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.

Sub-issues

Metadata

Metadata

Labels

area/controlplanearea/dataplanelifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.

Projects

Status

In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions