consul/agent/xds/proxystateconverter
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
..
clusters.go [NET-6305] xds: Ensure v2 route match and protocol are populated for gRPC (#19343) 2023-10-25 17:43:58 +00:00
converter.go catalog,mesh,auth: Bump versions to v2beta1 (#18930) 2023-09-22 10:51:15 -06:00
endpoints.go catalog,mesh,auth: Bump versions to v2beta1 (#18930) 2023-09-22 10:51:15 -06:00
failover_policy.go catalog,mesh,auth: Bump versions to v2beta1 (#18930) 2023-09-22 10:51:15 -06:00
failover_policy_ce.go Remove old build tags (#19128) 2023-10-10 10:58:06 -04:00
listeners.go [NET-4931] xdsv2, sidecarproxycontroller, l4 trafficpermissions: support L7 (#19185) 2023-10-12 23:45:45 +00:00
locality_policy.go chore: fix missing/incorrect license headers (#18555) 2023-08-22 17:23:54 -05:00
locality_policy_ce.go Remove old build tags (#19128) 2023-10-10 10:58:06 -04:00
routes.go catalog,mesh,auth: Bump versions to v2beta1 (#18930) 2023-09-22 10:51:15 -06:00