consul/internal/mesh
Michael Zalimeni a7803bd829
[NET-6305] xds: Ensure v2 route match and protocol are populated for gRPC (#19343)
* xds: Ensure v2 route match is populated for gRPC

Similar to HTTP, ensure that route match config (which is required by
Envoy) is populated when default values are used.

Because the default matches generated for gRPC contain a single empty
`GRPCRouteMatch`, and that proto does not directly support prefix-based
config, an interpretation of the empty struct is needed to generate the
same output that the `HTTPRouteMatch` is explicitly configured to
provide in internal/mesh/internal/controllers/routes/generate.go.

* xds: Ensure protocol set for gRPC resources

Add explicit protocol in `ProxyStateTemplate` builders and validate it
is always set on clusters. This ensures that HTTP filters and
`http2_protocol_options` are populated in all the necessary places for
gRPC traffic and prevents future unintended omissions of non-TCP
protocols.

Co-authored-by: John Murret <john.murret@hashicorp.com>

---------

Co-authored-by: John Murret <john.murret@hashicorp.com>
2023-10-25 17:43:58 +00:00
..
internal [NET-6305] xds: Ensure v2 route match and protocol are populated for gRPC (#19343) 2023-10-25 17:43:58 +00:00
proxy-snapshot Run copyright after running deep-copy as part of the Makefile/CI (#18741) 2023-09-11 13:50:52 -04:00
proxy-tracker Fix Traffic Permissions Default Deny (#19028) 2023-10-04 09:58:28 -04:00
exports.go mesh: sidecar proxy controller improvements (#19083) 2023-10-12 13:20:13 -06:00