Skip to content

Add a GrpcRoute to #165#211

Merged
olix0r merged 2 commits intoalex/outboundfrom
ver/outbound-api
Mar 7, 2023
Merged

Add a GrpcRoute to #165#211
olix0r merged 2 commits intoalex/outboundfrom
ver/outbound-api

Conversation

@olix0r
Copy link
Member

@olix0r olix0r commented Mar 6, 2023

To understand whether the changes proposed in #165 will be suitable for extension, this change adds a GrpcRoute type. This motivates a number of followup changes, all of which make the API more closely mirror the proxy's representation:

  • Filter and Distribution moved into HttpRoute. Each protocol/variant may have its own filter types, so we want to preserve namespacing.
  • Weights moved up into the Distribution
  • HttpRoute and GrpcRoute each get a RouteBackend that holds protocol-specific filter kinds.
  • Queue extracted from Backend. We could use it elsewhere...
  • Extracted an EndpointDiscovery strategy from BalanceP2c so that we can change that API if desired.
  • Added a Metadata onto the backend -- the controller is going to have populate that.

I'd like to include the GrpcRoute type in the API, even if some of the implementations are lacking. There's no reason we can't support this in the proxy in the near-term.


// Indicates the proxy is connecting to a named address (like an HTTP
// authority).
string authority = 3;
Copy link
Member Author

Choose a reason for hiding this comment

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

Using the word "authority" specifically indicates that it may have a port! Looking around the API, we don't have anywhere else where we use a string name and numeric port, so let's just go with a string encoded address.

rpc Watch(TrafficSpec) returns (stream OutboundPolicy) {}
}

message TargetSpec {
Copy link
Member Author

Choose a reason for hiding this comment

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

It isn't a target if it includes a source workload.

To understand whether the changes proposed in #165 will be suitable for
extension, this change adds a GrpcRoute type. This motivates a number of
followup changes, all of which make the API more closely mirror the
proxy's representation:

* Filter and Distribution moved into HttpRoute. Each protocol/variant
  may have its own filter types, so we want to preserve namespacing.
* Weights moved up into the Distribution
* HttpRoute and GrpcRoute each get a RouteBackend that holds
  protocol-specific filter kinds.
* Queue extracted from Backend. We could use it elsewhere...
* Extracted an `EndpointDiscovery` strategy from `BalanceP2c` so that we
  can change that API if desired.
* Added a `Metadata` onto the backend -- the controller is going to have
  populate that.
@olix0r olix0r force-pushed the ver/outbound-api branch from 4050d7b to a5f73e8 Compare March 6, 2023 23:29
@olix0r olix0r changed the title Add a GRPCRoute to #165 Add a GrpcRoute to #165 Mar 6, 2023
olix0r added a commit that referenced this pull request Mar 7, 2023
The new API needs to be able to describe, generally, opaque routes, even
though there is no user-facing configuration for these routes at the
moment.

This change eliminates the `Backend` on the top level response--it was
used _only_ to synthesize an opaque route in the proxy. This opaque
route should be represented properly in the API and synthesized in the
control plane.
@olix0r olix0r merged commit 8142526 into alex/outbound Mar 7, 2023
@olix0r olix0r deleted the ver/outbound-api branch March 7, 2023 00:08
olix0r added a commit that referenced this pull request Mar 7, 2023
The new API needs to be able to describe, generally, opaque routes, even
though there is no user-facing configuration for these routes at the
moment.

This change eliminates the `Backend` on the top level response--it was
used only to synthesize an opaque route in the proxy. This opaque
route should be represented properly in the API and synthesized in the
control plane.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants