forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config: reworking HTTP upstream config (envoyproxy#14079)
Replacing the http-protocol-specific fields in the cluster config with a new plugin Risk Level: medium Testing: updated tests to use the new config Docs Changes: updated docs to use the new config Release Notes: deprecation notes in the PR Deprecated: all http-specific cluster config. Signed-off-by: Alyssa Wilk <[email protected]>
- Loading branch information
1 parent
d7b10e8
commit 7554d61
Showing
97 changed files
with
1,408 additions
and
280 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. | ||
|
||
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") | ||
|
||
licenses(["notice"]) # Apache 2 | ||
|
||
api_proto_package( | ||
deps = [ | ||
"//envoy/config/core/v3:pkg", | ||
"@com_github_cncf_udpa//udpa/annotations:pkg", | ||
], | ||
) |
95 changes: 95 additions & 0 deletions
95
api/envoy/extensions/upstreams/http/v3/http_protocol_options.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
syntax = "proto3"; | ||
|
||
package envoy.extensions.upstreams.http.v3; | ||
|
||
import "envoy/config/core/v3/protocol.proto"; | ||
|
||
import "udpa/annotations/status.proto"; | ||
|
||
option java_package = "io.envoyproxy.envoy.extensions.upstreams.http.v3"; | ||
option java_outer_classname = "HttpProtocolOptionsProto"; | ||
option java_multiple_files = true; | ||
option (udpa.annotations.file_status).package_version_status = ACTIVE; | ||
|
||
// [#protodoc-title: HTTP Protocol Options] | ||
// [#extension: envoy.upstreams.http.http_protocol_options] | ||
|
||
// HttpProtocolOptions specifies Http upstream protocol options. This object | ||
// is used in | ||
// :ref:`typed_extension_protocol_options<envoy_api_field_config.cluster.v3.Cluster.typed_extension_protocol_options>`, | ||
// keyed by the name `envoy.extensions.upstreams.http.v3.HttpProtocolOptions`. | ||
// | ||
// This controls what protocol(s) should be used for upstream and how said protocol(s) are configured. | ||
// | ||
// This replaces the prior pattern of explicit protocol configuration directly | ||
// in the cluster. So a configuration like this, explicitly configuring the use of HTTP/2 upstream: | ||
// | ||
// .. code:: | ||
// | ||
// clusters: | ||
// - name: some_service | ||
// connect_timeout: 5s | ||
// upstream_http_protocol_options: | ||
// auto_sni: true | ||
// common_http_protocol_options: | ||
// idle_timeout: 1s | ||
// http2_protocol_options: | ||
// max_concurrent_streams: 100 | ||
// .... [further cluster config] | ||
// | ||
// Would now look like this: | ||
// | ||
// .. code:: | ||
// | ||
// clusters: | ||
// - name: some_service | ||
// connect_timeout: 5s | ||
// typed_extension_protocol_options: | ||
// envoy.extensions.upstreams.http.v3.HttpProtocolOptions: | ||
// "@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions | ||
// upstream_http_protocol_options: | ||
// auto_sni: true | ||
// common_http_protocol_options: | ||
// idle_timeout: 1s | ||
// explicit_http_config: | ||
// http2_protocol_options: | ||
// max_concurrent_streams: 100 | ||
// .... [further cluster config] | ||
message HttpProtocolOptions { | ||
// If this is used, the cluster will only operate on one of the possible upstream protocols (HTTP/1.1, HTTP/2). | ||
// If :ref:`http2_protocol_options <envoy_api_field_config.cluster.v3.Cluster.http2_protocol_options>` are | ||
// present, HTTP2 will be used, otherwise HTTP1.1 will be used. | ||
message ExplicitHttpConfig { | ||
oneof protocol_config { | ||
config.core.v3.Http1ProtocolOptions http_protocol_options = 1; | ||
|
||
config.core.v3.Http2ProtocolOptions http2_protocol_options = 2; | ||
} | ||
} | ||
|
||
// If this is used, the cluster can use either of the configured protocols, and | ||
// will use whichever protocol was used by the downstream connection. | ||
message UseDownstreamHttpConfig { | ||
config.core.v3.Http1ProtocolOptions http_protocol_options = 1; | ||
|
||
config.core.v3.Http2ProtocolOptions http2_protocol_options = 2; | ||
} | ||
|
||
// This contains options common across HTTP/1 and HTTP/2 | ||
config.core.v3.HttpProtocolOptions common_http_protocol_options = 1; | ||
|
||
// This contains common protocol options which are only applied upstream. | ||
config.core.v3.UpstreamHttpProtocolOptions upstream_http_protocol_options = 2; | ||
|
||
// This controls the actual protocol to be used upstream. | ||
// If none of the *upstream_protocol_options* are chosen, the default is *explicit_http_config*. | ||
oneof upstream_protocol_options { | ||
// To explicitly configure either HTTP/1 or HTTP/2 (but not both!) use *explicit_http_config*. | ||
// If the *explicit_http_config* is empty, HTTP/1.1 is used. | ||
ExplicitHttpConfig explicit_http_config = 3; | ||
|
||
// This allows switching on protocol based on what protocol the downstream | ||
// connection used. | ||
UseDownstreamHttpConfig use_downstream_protocol_config = 4; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
105 changes: 105 additions & 0 deletions
105
api/envoy/extensions/upstreams/http/v4alpha/http_protocol_options.proto
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.