linkerd2/controller/api/destination
Kevin Leimkuhler b830efdad7
Add OpaqueTransport field to destination protocol hints (#5421)
## What

When the destination service returns a destination profile for an endpoint,
indicate if the endpoint can receive opaque traffic.

## Why

Closes #5400

## How

When translating a pod address to a destination profile, the destination service
checks if the pod is controlled by any linkerd control plane. If it is, it can
set a protocol hint where we indicate that it supports H2 and opaque traffic.

If the pod supports opaque traffic, we need to get the port that it expects
inbound traffic on. We do this by getting the proxy container and reading it's
`LINKERD2_PROXY_INBOUND_LISTEN_ADDR` environment variable. If we successfully
parse that into a port, we can set the opaque transport field in the destination
profile.

## Testing

A test has been added to the destination server where a pod has a
`linkerd-proxy` container. We can expect the `OpaqueTransport` field to be set
in the returned destination profile's protocol hint.

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
2020-12-23 11:06:39 -05:00
..
watcher Add endpoint to GetProfile response (#5227) 2020-11-18 15:41:25 -05:00
client.go Trace Control plane Components with OC (#3495) 2019-10-18 12:19:13 -07:00
endpoint_translator.go Add OpaqueTransport field to destination protocol hints (#5421) 2020-12-23 11:06:39 -05:00
endpoint_translator_test.go Bump k8s client-go to v0.19.2 (#5002) 2020-09-28 12:45:18 -05:00
fallback_profile_listener.go Update ServiceProfile CRD to version v1alpha2 and remove validation (#3078) 2019-07-23 11:46:31 -07:00
fallback_profile_listener_test.go Update ServiceProfile CRD to version v1alpha2 and remove validation (#3078) 2019-07-23 11:46:31 -07:00
opaque_ports_adaptor.go Add opaque ports to destination service updates (#5294) 2020-12-18 12:38:59 -05:00
profile_translator.go Add opaque ports to destination service updates (#5294) 2020-12-18 12:38:59 -05:00
profile_translator_test.go profiles: Eliminate default timeout (#4958) 2020-09-10 14:00:18 -07:00
server.go Add OpaqueTransport field to destination protocol hints (#5421) 2020-12-23 11:06:39 -05:00
server_test.go Add OpaqueTransport field to destination protocol hints (#5421) 2020-12-23 11:06:39 -05:00
traffic_split_adaptor.go Always return destination overrides for services (#4890) 2020-08-19 12:25:58 -07:00
traffic_split_adaptor_test.go Always return destination overrides for services (#4890) 2020-08-19 12:25:58 -07:00