1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
// This file is @generated by prost-build.
///
/// HttpProtocolOptions specifies Http upstream protocol options. This object
/// is used in
/// : ref:`typed_extension_protocol_options<envoy_v3_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\]
/// \[\#next-free-field: 12\]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HttpProtocolOptions {
/// This contains options common across HTTP/1 and HTTP/2
#[prost(message, optional, tag = "1")]
pub common_http_protocol_options: ::core::option::Option<
super::super::super::super::config::core::v3::HttpProtocolOptions,
>,
/// This contains common protocol options which are only applied upstream.
#[prost(message, optional, tag = "2")]
pub upstream_http_protocol_options: ::core::option::Option<
super::super::super::super::config::core::v3::UpstreamHttpProtocolOptions,
>,
/// Optional HTTP filters for the upstream HTTP filter chain.
///
/// .. note::
/// Upstream HTTP filters are currently in alpha.
///
/// These filters will be applied for all HTTP streams which flow through this
/// cluster. Unlike downstream HTTP filters, they will *not* be applied to terminated CONNECT requests.
///
/// If using upstream HTTP filters, please be aware that local errors sent by
/// upstream HTTP filters will not trigger retries, and local errors sent by
/// upstream HTTP filters will count as a final response if hedging is configured.
/// \[\#extension-category: envoy.filters.http.upstream\]
#[prost(message, repeated, tag = "6")]
pub http_filters: ::prost::alloc::vec::Vec<
super::super::super::filters::network::http_connection_manager::v3::HttpFilter,
>,
/// Configuration options for Unified Header Validation (UHV).
/// UHV is an extensible mechanism for checking validity of HTTP responses.
///
/// \[\#comment:TODO(yanavlasov): Make it a link to the default header validator doc when it becomes visible.\]
/// Leaving this field unspecified, selects the default header validator `envoy.http.header_validators.envoy_default`.
///
/// \[\#not-implemented-hide:\]
/// \[\#extension-category: envoy.http.header_validators\]
#[prost(message, optional, tag = "7")]
pub header_validation_config: ::core::option::Option<
super::super::super::super::config::core::v3::TypedExtensionConfig,
>,
/// Defines http specific outlier detection parameters.
#[prost(message, optional, tag = "8")]
pub outlier_detection: ::core::option::Option<
http_protocol_options::OutlierDetection,
>,
/// Specifies a list of HTTP-level mirroring policies for requests routed to this cluster.
/// Cluster-level policies override route-level policies when they both are configured.
///
/// .. note::
///
/// Mirroring will not be triggered if the :ref:`primary cluster <envoy_v3_api_field_config.route.v3.RouteAction.cluster>` does not exist.
#[prost(message, repeated, tag = "9")]
pub request_mirror_policies: ::prost::alloc::vec::Vec<
super::super::super::super::config::route::v3::route_action::RequestMirrorPolicy,
>,
/// Specifies a list of hash policies for consistent hashing load balancing (e.g., Ring Hash or
/// Maglev) for requests routed to this cluster. When configured, cluster-level policies override
/// route-level policies. When not configured, route-level policies (if any) will be used.
///
/// This enables consistent routing to the same upstream host for all requests to a cluster,
/// which is particularly useful for stateful services like caching, session management, or
/// sticky routing requirements.
///
/// .. note::
///
/// Hash policies are only effective when the cluster is configured with a hash-based load
/// balancing policy (e.g., :ref:`RING_HASH <envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbPolicy.RING_HASH>`
/// or :ref:`MAGLEV <envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbPolicy.MAGLEV>`).
#[prost(message, repeated, tag = "10")]
pub hash_policy: ::prost::alloc::vec::Vec<
super::super::super::super::config::route::v3::route_action::HashPolicy,
>,
/// Specifies the retry policy for requests routed to this cluster. When configured,
/// cluster-level retry policy overrides route-level retry policy. When not configured,
/// route-level retry policy (if any) will be used.
///
/// .. note::
///
/// Cluster-level retry policy will override route-level retry policy entirely. Policies are
/// not merged.
#[prost(message, optional, tag = "11")]
pub retry_policy: ::core::option::Option<
super::super::super::super::config::route::v3::RetryPolicy,
>,
/// This controls the actual protocol to be used upstream.
#[prost(oneof = "http_protocol_options::UpstreamProtocolOptions", tags = "3, 4, 5")]
pub upstream_protocol_options: ::core::option::Option<
http_protocol_options::UpstreamProtocolOptions,
>,
}
/// Nested message and enum types in `HttpProtocolOptions`.
pub mod http_protocol_options {
/// If this is used, the cluster will only operate on one of the possible upstream protocols.
/// Note that HTTP/2 or above should generally be used for upstream gRPC clusters.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExplicitHttpConfig {
#[prost(oneof = "explicit_http_config::ProtocolConfig", tags = "1, 2, 3")]
pub protocol_config: ::core::option::Option<
explicit_http_config::ProtocolConfig,
>,
}
/// Nested message and enum types in `ExplicitHttpConfig`.
pub mod explicit_http_config {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ProtocolConfig {
#[prost(message, tag = "1")]
HttpProtocolOptions(
super::super::super::super::super::super::config::core::v3::Http1ProtocolOptions,
),
#[prost(message, tag = "2")]
Http2ProtocolOptions(
super::super::super::super::super::super::config::core::v3::Http2ProtocolOptions,
),
/// .. warning::
/// QUIC upstream support is currently not ready for internet use.
/// Please see :ref:`here <arch_overview_http3>` for details.
#[prost(message, tag = "3")]
Http3ProtocolOptions(
super::super::super::super::super::super::config::core::v3::Http3ProtocolOptions,
),
}
}
impl ::prost::Name for ExplicitHttpConfig {
const NAME: &'static str = "ExplicitHttpConfig";
const PACKAGE: &'static str = "envoy.extensions.upstreams.http.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.extensions.upstreams.http.v3.HttpProtocolOptions.ExplicitHttpConfig"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions.ExplicitHttpConfig"
.into()
}
}
/// If this is used, the cluster can use either of the configured protocols, and
/// will use whichever protocol was used by the downstream connection.
///
/// If HTTP/3 is configured for downstream and not configured for upstream,
/// HTTP/3 requests will fail over to HTTP/2.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UseDownstreamHttpConfig {
#[prost(message, optional, tag = "1")]
pub http_protocol_options: ::core::option::Option<
super::super::super::super::super::config::core::v3::Http1ProtocolOptions,
>,
#[prost(message, optional, tag = "2")]
pub http2_protocol_options: ::core::option::Option<
super::super::super::super::super::config::core::v3::Http2ProtocolOptions,
>,
/// .. warning::
/// QUIC upstream support is currently not ready for internet use.
/// Please see :ref:`here <arch_overview_http3>` for details.
#[prost(message, optional, tag = "3")]
pub http3_protocol_options: ::core::option::Option<
super::super::super::super::super::config::core::v3::Http3ProtocolOptions,
>,
}
impl ::prost::Name for UseDownstreamHttpConfig {
const NAME: &'static str = "UseDownstreamHttpConfig";
const PACKAGE: &'static str = "envoy.extensions.upstreams.http.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.extensions.upstreams.http.v3.HttpProtocolOptions.UseDownstreamHttpConfig"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions.UseDownstreamHttpConfig"
.into()
}
}
/// If this is used, the cluster can use either HTTP/1 or HTTP/2, and will use whichever
/// protocol is negotiated by ALPN with the upstream.
/// Clusters configured with `AutoHttpConfig` will use the highest available
/// protocol; HTTP/2 if supported, otherwise HTTP/1.
/// If the upstream does not support ALPN, `AutoHttpConfig` will fail over to HTTP/1.
/// This can only be used with transport sockets which support ALPN. Using a
/// transport socket which does not support ALPN will result in configuration
/// failure. The transport layer may be configured with custom ALPN, but the default ALPN
/// for the cluster (or if custom ALPN fails) will be "h2,http/1.1".
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AutoHttpConfig {
#[prost(message, optional, tag = "1")]
pub http_protocol_options: ::core::option::Option<
super::super::super::super::super::config::core::v3::Http1ProtocolOptions,
>,
#[prost(message, optional, tag = "2")]
pub http2_protocol_options: ::core::option::Option<
super::super::super::super::super::config::core::v3::Http2ProtocolOptions,
>,
/// Unlike HTTP/1 and HTTP/2, HTTP/3 will not be configured unless it is
/// present, and (soon) only if there is an indication of server side
/// support.
/// See :ref:`here <arch_overview_http3_upstream>` for more information on
/// when HTTP/3 will be used, and when Envoy will fail over to TCP.
///
/// .. warning::
/// QUIC upstream support is currently not ready for internet use.
/// Please see :ref:`here <arch_overview_http3>` for details.
#[prost(message, optional, tag = "3")]
pub http3_protocol_options: ::core::option::Option<
super::super::super::super::super::config::core::v3::Http3ProtocolOptions,
>,
/// The presence of alternate protocols cache options causes the use of the
/// alternate protocols cache, which is responsible for parsing and caching
/// HTTP Alt-Svc headers. This enables the use of HTTP/3 for origins that
/// advertise supporting it.
///
/// .. note::
/// This is required when HTTP/3 is enabled.
#[prost(message, optional, tag = "4")]
pub alternate_protocols_cache_options: ::core::option::Option<
super::super::super::super::super::config::core::v3::AlternateProtocolsCacheOptions,
>,
}
impl ::prost::Name for AutoHttpConfig {
const NAME: &'static str = "AutoHttpConfig";
const PACKAGE: &'static str = "envoy.extensions.upstreams.http.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.extensions.upstreams.http.v3.HttpProtocolOptions.AutoHttpConfig"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions.AutoHttpConfig"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OutlierDetection {
/// If specified, only responses matching the matcher will be treated by outlier detection as errors.
/// If not specified, only 5xx codes are treated by outlier detection as errors.
#[prost(message, optional, tag = "1")]
pub error_matcher: ::core::option::Option<
super::super::super::super::super::config::common::matcher::v3::MatchPredicate,
>,
}
impl ::prost::Name for OutlierDetection {
const NAME: &'static str = "OutlierDetection";
const PACKAGE: &'static str = "envoy.extensions.upstreams.http.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.extensions.upstreams.http.v3.HttpProtocolOptions.OutlierDetection"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions.OutlierDetection"
.into()
}
}
/// This controls the actual protocol to be used upstream.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum UpstreamProtocolOptions {
/// To explicitly configure either HTTP/1 or HTTP/2 (but not both!) use `explicit_http_config`.
#[prost(message, tag = "3")]
ExplicitHttpConfig(ExplicitHttpConfig),
/// This allows switching on protocol based on what protocol the downstream
/// connection used.
#[prost(message, tag = "4")]
UseDownstreamProtocolConfig(UseDownstreamHttpConfig),
/// This allows switching on protocol based on ALPN
#[prost(message, tag = "5")]
AutoConfig(AutoHttpConfig),
}
}
impl ::prost::Name for HttpProtocolOptions {
const NAME: &'static str = "HttpProtocolOptions";
const PACKAGE: &'static str = "envoy.extensions.upstreams.http.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.extensions.upstreams.http.v3.HttpProtocolOptions".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions"
.into()
}
}