From 9d70814f68e7d653c1adcf414cd0e682e08ab8aa Mon Sep 17 00:00:00 2001 From: "data-plane-api(Azure Pipelines)" Date: Tue, 9 Feb 2021 15:25:02 +0000 Subject: [PATCH] http3: adding upstream API hooks (#14839) Only adding explicit (hard-configured, or downstream-initiated) HTTP/3. Getting Auto for UDP/TCP is going to take substantially more work. HTTP/3 config will be rejected initially to keep this PR simple as possible. Risk Level: Low (unused, hidden) Testing: new unit tests Docs Changes: n/a Release Notes: n/a Part of #14829 Signed-off-by: Alyssa Wilk Mirrored from https://github.com/envoyproxy/envoy @ d06b41c670e29de9d09f0f088e007611f3800db9 --- envoy/config/core/v3/protocol.proto | 8 ++++++++ envoy/config/core/v4alpha/protocol.proto | 10 ++++++++++ .../upstreams/http/v3/http_protocol_options.proto | 8 +++++++- .../upstreams/http/v4alpha/http_protocol_options.proto | 8 +++++++- 4 files changed, 32 insertions(+), 2 deletions(-) diff --git a/envoy/config/core/v3/protocol.proto b/envoy/config/core/v3/protocol.proto index 80d971c1..7108fba3 100644 --- a/envoy/config/core/v3/protocol.proto +++ b/envoy/config/core/v3/protocol.proto @@ -389,3 +389,11 @@ message GrpcProtocolOptions { Http2ProtocolOptions http2_protocol_options = 1; } + +// [#not-implemented-hide:] +// +// A message which allows using HTTP/3 as an upstream protocol. +// +// Eventually this will include configuration for tuning HTTP/3. +message Http3ProtocolOptions { +} diff --git a/envoy/config/core/v4alpha/protocol.proto b/envoy/config/core/v4alpha/protocol.proto index 60f0b321..86bec0ec 100644 --- a/envoy/config/core/v4alpha/protocol.proto +++ b/envoy/config/core/v4alpha/protocol.proto @@ -382,3 +382,13 @@ message GrpcProtocolOptions { Http2ProtocolOptions http2_protocol_options = 1; } + +// [#not-implemented-hide:] +// +// A message which allows using HTTP/3 as an upstream protocol. +// +// Eventually this will include configuration for tuning HTTP/3. +message Http3ProtocolOptions { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.core.v3.Http3ProtocolOptions"; +} diff --git a/envoy/extensions/upstreams/http/v3/http_protocol_options.proto b/envoy/extensions/upstreams/http/v3/http_protocol_options.proto index e7cf42df..00cac9d2 100644 --- a/envoy/extensions/upstreams/http/v3/http_protocol_options.proto +++ b/envoy/extensions/upstreams/http/v3/http_protocol_options.proto @@ -58,7 +58,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // .... [further cluster config] // [#next-free-field: 6] message HttpProtocolOptions { - // If this is used, the cluster will only operate on one of the possible upstream protocols (HTTP/1.1, HTTP/2). + // If this is used, the cluster will only operate on one of the possible upstream protocols. // Note that HTTP/2 should generally be used for upstream clusters doing gRPC. message ExplicitHttpConfig { oneof protocol_config { @@ -67,6 +67,9 @@ message HttpProtocolOptions { config.core.v3.Http1ProtocolOptions http_protocol_options = 1; config.core.v3.Http2ProtocolOptions http2_protocol_options = 2; + + // [#not-implemented-hide:] + config.core.v3.Http3ProtocolOptions http3_protocol_options = 3; } } @@ -76,6 +79,9 @@ message HttpProtocolOptions { config.core.v3.Http1ProtocolOptions http_protocol_options = 1; config.core.v3.Http2ProtocolOptions http2_protocol_options = 2; + + // [#not-implemented-hide:] + config.core.v3.Http3ProtocolOptions http3_protocol_options = 3; } // If this is used, the cluster can use either HTTP/1 or HTTP/2, and will use whichever diff --git a/envoy/extensions/upstreams/http/v4alpha/http_protocol_options.proto b/envoy/extensions/upstreams/http/v4alpha/http_protocol_options.proto index 277ceb9a..e3cf4476 100644 --- a/envoy/extensions/upstreams/http/v4alpha/http_protocol_options.proto +++ b/envoy/extensions/upstreams/http/v4alpha/http_protocol_options.proto @@ -62,7 +62,7 @@ message HttpProtocolOptions { option (udpa.annotations.versioning).previous_message_type = "envoy.extensions.upstreams.http.v3.HttpProtocolOptions"; - // If this is used, the cluster will only operate on one of the possible upstream protocols (HTTP/1.1, HTTP/2). + // If this is used, the cluster will only operate on one of the possible upstream protocols. // Note that HTTP/2 should generally be used for upstream clusters doing gRPC. message ExplicitHttpConfig { option (udpa.annotations.versioning).previous_message_type = @@ -74,6 +74,9 @@ message HttpProtocolOptions { config.core.v4alpha.Http1ProtocolOptions http_protocol_options = 1; config.core.v4alpha.Http2ProtocolOptions http2_protocol_options = 2; + + // [#not-implemented-hide:] + config.core.v4alpha.Http3ProtocolOptions http3_protocol_options = 3; } } @@ -86,6 +89,9 @@ message HttpProtocolOptions { config.core.v4alpha.Http1ProtocolOptions http_protocol_options = 1; config.core.v4alpha.Http2ProtocolOptions http2_protocol_options = 2; + + // [#not-implemented-hide:] + config.core.v4alpha.Http3ProtocolOptions http3_protocol_options = 3; } // If this is used, the cluster can use either HTTP/1 or HTTP/2, and will use whichever