Tcpproxy: implement on_demand (#20409)

Add an extra async cluster look up. The continuation of the cluster look up is establishUpstreamConnection().
To establishConnection() is also the callback of upstream connection failure.

Additional Description:
Risk Level: LOW if odcds is disabled, the code path remains the same.
Testing: Added integration tests and existing unit test is untouched.
Docs Changes: n/a
Release Notes: inline

Signed-off-by: Yuchen Dai <silentdai@gmail.com>

Mirrored from https://github.com/envoyproxy/envoy @ 0a587f23b21ab34b28d9c53428af259b3f7b0970
pull/626/head
data-plane-api(Azure Pipelines) 3 years ago
parent 4d66fafcf2
commit 8832dd9c53
  1. 5
      envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.proto

@ -126,10 +126,9 @@ message TcpProxy {
// The on demand policy for the upstream cluster.
// It applies to both
// :ref:`TcpProxy.cluster <envoy_v3_api_field_extensions.filters.network.tcp_proxy.v3.TcpProxy.cluster`
// :ref:`TcpProxy.cluster <envoy_v3_api_field_extensions.filters.network.tcp_proxy.v3.TcpProxy.cluster>`
// and
// :ref:`TcpProxy.weighted_clusters <envoy_v3_api_field_extensions.filters.network.tcp_proxy.v3.TcpProxy.weighted_clusters`.
// [#not-implemented-hide:]
// :ref:`TcpProxy.weighted_clusters <envoy_v3_api_field_extensions.filters.network.tcp_proxy.v3.TcpProxy.weighted_clusters>`.
OnDemand on_demand = 14;
// Optional endpoint metadata match criteria. Only endpoints in the upstream

Loading…
Cancel
Save