api: support customized UpgradeConfigs#5300
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5300 +/- ##
==========================================
- Coverage 65.10% 65.09% -0.02%
==========================================
Files 213 213
Lines 33586 33586
==========================================
- Hits 21867 21862 -5
- Misses 10393 10397 +4
- Partials 1326 1327 +1 ☔ View full report in Codecov by Sentry. |
|
the other option is calling it backendProtocols, which relates to https://gateway-api.sigs.k8s.io/guides/backend-protocol/ |
a21023f to
dac924d
Compare
|
hey @zirain lets also make sure we address #3663 here |
e42db4b to
9d7f274
Compare
|
Hi @zirain, thanks for tackling that topic! You added the new config property to the BackendTrafficPolicy. The docs are defining it as:
Isn´t http upgrade_type an HttpRoute specific thing? Just wondering if it makes sense to integrate it as implementation specific HTTPRouteFilter within ExtensionRef Can we also tackle CONNECT_UDP ?
Furthermore adding ConnectConfig as props would be nice. This can be specified if protocol is CONNECT or CONNECT-UDP |
|
IMO, Is there a user case, we do the upgrade in one route and not in another route for the same backend? |
1fd6425 to
495016c
Compare
tbh, not absolutely sure about that. The property wouldn't have an effect if we use a tcp-route, right? So therefore I thought properties are added where the effect takes place. Furthermore there is a related property per route that might be necessary to set in certain scenarios: |
Right, we named it as |
that's another feature, which is related more than protocol upgrade, in the future, we may need both to support connect matcher. |
There was a problem hiding this comment.
unsure here if we should be using Protocol or Type (for type of upgrade)
There was a problem hiding this comment.
we could add a Connect field in this API in the future
connect:
forwardTCP: false | true // Supports TCP tunnels
allowHTTP2: false | true
allowHTTP3: false | true
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
495016c to
7a8424d
Compare
| // e.g. `websocket`, `CONNECT`, `spdy/3.1` etc. | ||
| // | ||
| // +kubebuilder:validation:Required | ||
| Type string `json:"type"` |
There was a problem hiding this comment.
the problem is that envoy didn't list all the protocol types it supported in doc.
There was a problem hiding this comment.
prefer to leave it as string.
There was a problem hiding this comment.
As a control plane we could be strict about what we support, but since proxy allows arbitrary string, so it's fine I guess.
|
hey @zirain rethinking think one, as @denniskniep suggested |
I replied this before, and we may need both in the future. |
I personally don´t have currently such a use case. But I guess that such use case can happen. If we just think that the upstream target is also kind of complex ReverseProxy, which offers different services behind one ip+port combination... My point is why we are adding this feature/property to a resource where it is not as flexible as it would with the other choice/resource. I can´t see any further downsides shifting that property to HttpRoute Furthermore the upgrade config is something which is going on between downstream and envoy. Maybe upgrade config has also influence to upstream, but that must not be the case. Looking especially at the http-connect config, this has nothing to do with the upstream, meaning BackendRef in our case. Example: In this example the upgrade config is purely a setting between downstream and envoy. It would be counterintuitive to configure it on the upstream (backendRef) At least my point of view. Am I missing something? |
|
From my point of view, a gateway may have more than 1 httproute. Thinking of I have N httproute in , before EG support #5351, you need to ref the route filter in every http route for that backend. I'm not against copy this struct into ATM, you can ref BTP to Gateway or HTTPRoute, which sounds good to me. I think this API solves #4859, but for #3663 we need more work on |
xref: #4859 #3663 #5276