Closed pitabwire closed 8 months ago
@arkodg ideas how this can be configured? I am thinking that can be this enabled by default? Is it wrong to configure it everywhere by default https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/http/upgrades
if cannot be enabled by default, which is the correct place to configure that? BackendTrafficPolicy?
@zetaab we do enable web socket upgrades by default https://github.com/envoyproxy/gateway/blob/c30d037a0018ddb131cacb2f041ae5bc81dcae10/internal/xds/translator/listener.go#L245 only when the routes attached are HTTPRoute
, if there is a GRPCRoute
attached to the same listener, we dont (that enables the listener.IsHTTP2
field)
@pitabwire do you have a GRPCRoute
attached to the same listener 😄 ?
Yes @arkodg I have Grpc routes in there. Indeed removing them the websocket service works now. We however need them utilizing the same listener can they be made to coexist?
afaik upgrades are not allowed for gRPC, but since the filter chain is the same (since the hostname
is same as well as port
), there is no way to disallow for gRPC traffic, but allow for http/1.1 afaik
nvm, this is fixable, by moving the websocket upgrade config from hcm to route https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#envoy-v3-api-msg-config-route-v3-routeaction
thanks for fixing the issue @zetaab ! @pitabwire can you confirm that the issue is fixed ?
@arkodg @zetaab with the fix it now works very well. Thank you for fixing this The number of files touched though seems to be on the very high side.
@arkodg @zetaab with the fix it now works very well. Thank you for fixing this The number of files touched though seems to be on the very high side.
yeah, they are testdata files
Description:
Repro steps:
apiVersion: v1 kind: Service metadata: name: websocket-test labels: app.kubernetes.io/name: websocket-test spec: ports:
apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: websocket-test spec: parentRefs:
apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: default namespace: envoy-gateway-system spec: gatewayClassName: envoy-gateway listeners: