...
1syntax = "proto3";
2
3package envoy.config.route.v3;
4
5import "udpa/annotations/status.proto";
6import "udpa/annotations/versioning.proto";
7import "validate/validate.proto";
8
9option java_package = "io.envoyproxy.envoy.config.route.v3";
10option java_outer_classname = "ScopedRouteProto";
11option java_multiple_files = true;
12option (udpa.annotations.file_status).package_version_status = ACTIVE;
13
14// [#protodoc-title: HTTP scoped routing configuration]
15// * Routing :ref:`architecture overview <arch_overview_http_routing>`
16
17// Specifies a routing scope, which associates a
18// :ref:`Key<envoy_api_msg_config.route.v3.ScopedRouteConfiguration.Key>` to a
19// :ref:`envoy_api_msg_config.route.v3.RouteConfiguration` (identified by its resource name).
20//
21// The HTTP connection manager builds up a table consisting of these Key to
22// RouteConfiguration mappings, and looks up the RouteConfiguration to use per
23// request according to the algorithm specified in the
24// :ref:`scope_key_builder<envoy_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`
25// assigned to the HttpConnectionManager.
26//
27// For example, with the following configurations (in YAML):
28//
29// HttpConnectionManager config:
30//
31// .. code::
32//
33// ...
34// scoped_routes:
35// name: foo-scoped-routes
36// scope_key_builder:
37// fragments:
38// - header_value_extractor:
39// name: X-Route-Selector
40// element_separator: ,
41// element:
42// separator: =
43// key: vip
44//
45// ScopedRouteConfiguration resources (specified statically via
46// :ref:`scoped_route_configurations_list<envoy_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scoped_route_configurations_list>`
47// or obtained dynamically via SRDS):
48//
49// .. code::
50//
51// (1)
52// name: route-scope1
53// route_configuration_name: route-config1
54// key:
55// fragments:
56// - string_key: 172.10.10.20
57//
58// (2)
59// name: route-scope2
60// route_configuration_name: route-config2
61// key:
62// fragments:
63// - string_key: 172.20.20.30
64//
65// A request from a client such as:
66//
67// .. code::
68//
69// GET / HTTP/1.1
70// Host: foo.com
71// X-Route-Selector: vip=172.10.10.20
72//
73// would result in the routing table defined by the `route-config1`
74// RouteConfiguration being assigned to the HTTP request/stream.
75//
76message ScopedRouteConfiguration {
77 option (udpa.annotations.versioning).previous_message_type =
78 "envoy.api.v2.ScopedRouteConfiguration";
79
80 // Specifies a key which is matched against the output of the
81 // :ref:`scope_key_builder<envoy_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`
82 // specified in the HttpConnectionManager. The matching is done per HTTP
83 // request and is dependent on the order of the fragments contained in the
84 // Key.
85 message Key {
86 option (udpa.annotations.versioning).previous_message_type =
87 "envoy.api.v2.ScopedRouteConfiguration.Key";
88
89 message Fragment {
90 option (udpa.annotations.versioning).previous_message_type =
91 "envoy.api.v2.ScopedRouteConfiguration.Key.Fragment";
92
93 oneof type {
94 option (validate.required) = true;
95
96 // A string to match against.
97 string string_key = 1;
98 }
99 }
100
101 // The ordered set of fragments to match against. The order must match the
102 // fragments in the corresponding
103 // :ref:`scope_key_builder<envoy_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
104 repeated Fragment fragments = 1 [(validate.rules).repeated = {min_items: 1}];
105 }
106
107 // Whether the RouteConfiguration should be loaded on demand.
108 bool on_demand = 4;
109
110 // The name assigned to the routing scope.
111 string name = 1 [(validate.rules).string = {min_len: 1}];
112
113 // The resource name to use for a :ref:`envoy_api_msg_service.discovery.v3.DiscoveryRequest` to an
114 // RDS server to fetch the :ref:`envoy_api_msg_config.route.v3.RouteConfiguration` associated
115 // with this scope.
116 string route_configuration_name = 2 [(validate.rules).string = {min_len: 1}];
117
118 // The key to match against.
119 Key key = 3 [(validate.rules).message = {required: true}];
120}
View as plain text