/
route.proto
165 lines (140 loc) · 8.61 KB
/
route.proto
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
syntax = "proto3";
package envoy.config.route.v3;
import "envoy/config/core/v3/base.proto";
import "envoy/config/core/v3/config_source.proto";
import "envoy/config/route/v3/route_components.proto";
import "google/protobuf/any.proto";
import "google/protobuf/wrappers.proto";
import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.config.route.v3";
option java_outer_classname = "RouteProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/route/v3;routev3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: HTTP route configuration]
// * Routing :ref:`architecture overview <arch_overview_http_routing>`
// * HTTP :ref:`router filter <config_http_filters_router>`
// [#next-free-field: 17]
message RouteConfiguration {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.RouteConfiguration";
// The name of the route configuration. For example, it might match
// :ref:`route_config_name
// <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.Rds.route_config_name>` in
// :ref:`envoy_v3_api_msg_extensions.filters.network.http_connection_manager.v3.Rds`.
string name = 1;
// An array of virtual hosts that make up the route table.
repeated VirtualHost virtual_hosts = 2;
// An array of virtual hosts will be dynamically loaded via the VHDS API.
// Both ``virtual_hosts`` and ``vhds`` fields will be used when present. ``virtual_hosts`` can be used
// for a base routing table or for infrequently changing virtual hosts. ``vhds`` is used for
// on-demand discovery of virtual hosts. The contents of these two fields will be merged to
// generate a routing table for a given RouteConfiguration, with ``vhds`` derived configuration
// taking precedence.
Vhds vhds = 9;
// Optionally specifies a list of HTTP headers that the connection manager
// will consider to be internal only. If they are found on external requests they will be cleaned
// prior to filter invocation. See :ref:`config_http_conn_man_headers_x-envoy-internal` for more
// information.
repeated string internal_only_headers = 3 [
(validate.rules).repeated = {items {string {well_known_regex: HTTP_HEADER_NAME strict: false}}}
];
// Specifies a list of HTTP headers that should be added to each response that
// the connection manager encodes. Headers specified at this level are applied
// after headers from any enclosed :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` or
// :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. For more information, including details on
// header value syntax, see the documentation on :ref:`custom request headers
// <config_http_conn_man_headers_custom_request_headers>`.
repeated core.v3.HeaderValueOption response_headers_to_add = 4
[(validate.rules).repeated = {max_items: 1000}];
// Specifies a list of HTTP headers that should be removed from each response
// that the connection manager encodes.
repeated string response_headers_to_remove = 5 [
(validate.rules).repeated = {items {string {well_known_regex: HTTP_HEADER_NAME strict: false}}}
];
// Specifies a list of HTTP headers that should be added to each request
// routed by the HTTP connection manager. Headers specified at this level are
// applied after headers from any enclosed :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` or
// :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. For more information, including details on
// header value syntax, see the documentation on :ref:`custom request headers
// <config_http_conn_man_headers_custom_request_headers>`.
repeated core.v3.HeaderValueOption request_headers_to_add = 6
[(validate.rules).repeated = {max_items: 1000}];
// Specifies a list of HTTP headers that should be removed from each request
// routed by the HTTP connection manager.
repeated string request_headers_to_remove = 8 [
(validate.rules).repeated = {items {string {well_known_regex: HTTP_HEADER_NAME strict: false}}}
];
// By default, headers that should be added/removed are evaluated from most to least specific:
//
// * route level
// * virtual host level
// * connection manager level
//
// To allow setting overrides at the route or virtual host level, this order can be reversed
// by setting this option to true. Defaults to false.
//
bool most_specific_header_mutations_wins = 10;
// An optional boolean that specifies whether the clusters that the route
// table refers to will be validated by the cluster manager. If set to true
// and a route refers to a non-existent cluster, the route table will not
// load. If set to false and a route refers to a non-existent cluster, the
// route table will load and the router filter will return a 404 if the route
// is selected at runtime. This setting defaults to true if the route table
// is statically defined via the :ref:`route_config
// <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.route_config>`
// option. This setting default to false if the route table is loaded dynamically via the
// :ref:`rds
// <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.rds>`
// option. Users may wish to override the default behavior in certain cases (for example when
// using CDS with a static route table).
google.protobuf.BoolValue validate_clusters = 7;
// The maximum bytes of the response :ref:`direct response body
// <envoy_v3_api_field_config.route.v3.DirectResponseAction.body>` size. If not specified the default
// is 4096.
//
// .. warning::
//
// Envoy currently holds the content of :ref:`direct response body
// <envoy_v3_api_field_config.route.v3.DirectResponseAction.body>` in memory. Be careful setting
// this to be larger than the default 4KB, since the allocated memory for direct response body
// is not subject to data plane buffering controls.
//
google.protobuf.UInt32Value max_direct_response_body_size_bytes = 11;
// A list of plugins and their configurations which may be used by a
// :ref:`cluster specifier plugin name <envoy_v3_api_field_config.route.v3.RouteAction.cluster_specifier_plugin>`
// within the route. All ``extension.name`` fields in this list must be unique.
repeated ClusterSpecifierPlugin cluster_specifier_plugins = 12;
// Specify a set of default request mirroring policies which apply to all routes under its virtual hosts.
// Note that policies are not merged, the most specific non-empty one becomes the mirror policies.
repeated RouteAction.RequestMirrorPolicy request_mirror_policies = 13;
// By default, port in :authority header (if any) is used in host matching.
// With this option enabled, Envoy will ignore the port number in the :authority header (if any) when picking VirtualHost.
// NOTE: this option will not strip the port number (if any) contained in route config
// :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`.domains field.
bool ignore_port_in_host_matching = 14;
// Ignore path-parameters in path-matching.
// Before RFC3986, URI were like(RFC1808): <scheme>://<net_loc>/<path>;<params>?<query>#<fragment>
// Envoy by default takes ":path" as "<path>;<params>".
// For users who want to only match path on the "<path>" portion, this option should be true.
bool ignore_path_parameters_in_path_matching = 15;
// The typed_per_filter_config field can be used to provide RouteConfiguration level per filter config.
// The key should match the :ref:`filter config name
// <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpFilter.name>`.
// The canonical filter name (e.g., ``envoy.filters.http.buffer`` for the HTTP buffer filter) can also
// be used for the backwards compatibility. If there is no entry referred by the filter config name, the
// entry referred by the canonical filter name will be provided to the filters as fallback.
//
// Use of this field is filter specific;
// see the :ref:`HTTP filter documentation <config_http_filters>` for if and how it is utilized.
// [#comment: An entry's value may be wrapped in a
// :ref:`FilterConfig<envoy_v3_api_msg_config.route.v3.FilterConfig>`
// message to specify additional options.]
map<string, google.protobuf.Any> typed_per_filter_config = 16;
}
message Vhds {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.Vhds";
// Configuration source specifier for VHDS.
core.v3.ConfigSource config_source = 1 [(validate.rules).message = {required: true}];
}