route.proto 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. syntax = "proto3";
  2. package envoy.config.route.v3;
  3. import "envoy/config/core/v3/base.proto";
  4. import "envoy/config/core/v3/config_source.proto";
  5. import "envoy/config/core/v3/extension.proto";
  6. import "envoy/config/route/v3/route_components.proto";
  7. import "google/protobuf/wrappers.proto";
  8. import "udpa/annotations/status.proto";
  9. import "udpa/annotations/versioning.proto";
  10. import "validate/validate.proto";
  11. option java_package = "io.envoyproxy.envoy.config.route.v3";
  12. option java_outer_classname = "RouteProto";
  13. option java_multiple_files = true;
  14. option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/route/v3;routev3";
  15. option (udpa.annotations.file_status).package_version_status = ACTIVE;
  16. // [#protodoc-title: HTTP route configuration]
  17. // * Routing :ref:`architecture overview <arch_overview_http_routing>`
  18. // * HTTP :ref:`router filter <config_http_filters_router>`
  19. // [#next-free-field: 13]
  20. message RouteConfiguration {
  21. option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.RouteConfiguration";
  22. // The name of the route configuration. For example, it might match
  23. // :ref:`route_config_name
  24. // <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.Rds.route_config_name>` in
  25. // :ref:`envoy_v3_api_msg_extensions.filters.network.http_connection_manager.v3.Rds`.
  26. string name = 1;
  27. // An array of virtual hosts that make up the route table.
  28. repeated VirtualHost virtual_hosts = 2;
  29. // An array of virtual hosts will be dynamically loaded via the VHDS API.
  30. // Both *virtual_hosts* and *vhds* fields will be used when present. *virtual_hosts* can be used
  31. // for a base routing table or for infrequently changing virtual hosts. *vhds* is used for
  32. // on-demand discovery of virtual hosts. The contents of these two fields will be merged to
  33. // generate a routing table for a given RouteConfiguration, with *vhds* derived configuration
  34. // taking precedence.
  35. Vhds vhds = 9;
  36. // Optionally specifies a list of HTTP headers that the connection manager
  37. // will consider to be internal only. If they are found on external requests they will be cleaned
  38. // prior to filter invocation. See :ref:`config_http_conn_man_headers_x-envoy-internal` for more
  39. // information.
  40. repeated string internal_only_headers = 3 [
  41. (validate.rules).repeated = {items {string {well_known_regex: HTTP_HEADER_NAME strict: false}}}
  42. ];
  43. // Specifies a list of HTTP headers that should be added to each response that
  44. // the connection manager encodes. Headers specified at this level are applied
  45. // after headers from any enclosed :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` or
  46. // :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. For more information, including details on
  47. // header value syntax, see the documentation on :ref:`custom request headers
  48. // <config_http_conn_man_headers_custom_request_headers>`.
  49. repeated core.v3.HeaderValueOption response_headers_to_add = 4
  50. [(validate.rules).repeated = {max_items: 1000}];
  51. // Specifies a list of HTTP headers that should be removed from each response
  52. // that the connection manager encodes.
  53. repeated string response_headers_to_remove = 5 [
  54. (validate.rules).repeated = {items {string {well_known_regex: HTTP_HEADER_NAME strict: false}}}
  55. ];
  56. // Specifies a list of HTTP headers that should be added to each request
  57. // routed by the HTTP connection manager. Headers specified at this level are
  58. // applied after headers from any enclosed :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` or
  59. // :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. For more information, including details on
  60. // header value syntax, see the documentation on :ref:`custom request headers
  61. // <config_http_conn_man_headers_custom_request_headers>`.
  62. repeated core.v3.HeaderValueOption request_headers_to_add = 6
  63. [(validate.rules).repeated = {max_items: 1000}];
  64. // Specifies a list of HTTP headers that should be removed from each request
  65. // routed by the HTTP connection manager.
  66. repeated string request_headers_to_remove = 8 [
  67. (validate.rules).repeated = {items {string {well_known_regex: HTTP_HEADER_NAME strict: false}}}
  68. ];
  69. // By default, headers that should be added/removed are evaluated from most to least specific:
  70. //
  71. // * route level
  72. // * virtual host level
  73. // * connection manager level
  74. //
  75. // To allow setting overrides at the route or virtual host level, this order can be reversed
  76. // by setting this option to true. Defaults to false.
  77. //
  78. // [#next-major-version: In the v3 API, this will default to true.]
  79. bool most_specific_header_mutations_wins = 10;
  80. // An optional boolean that specifies whether the clusters that the route
  81. // table refers to will be validated by the cluster manager. If set to true
  82. // and a route refers to a non-existent cluster, the route table will not
  83. // load. If set to false and a route refers to a non-existent cluster, the
  84. // route table will load and the router filter will return a 404 if the route
  85. // is selected at runtime. This setting defaults to true if the route table
  86. // is statically defined via the :ref:`route_config
  87. // <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.route_config>`
  88. // option. This setting default to false if the route table is loaded dynamically via the
  89. // :ref:`rds
  90. // <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.rds>`
  91. // option. Users may wish to override the default behavior in certain cases (for example when
  92. // using CDS with a static route table).
  93. google.protobuf.BoolValue validate_clusters = 7;
  94. // The maximum bytes of the response :ref:`direct response body
  95. // <envoy_v3_api_field_config.route.v3.DirectResponseAction.body>` size. If not specified the default
  96. // is 4096.
  97. //
  98. // .. warning::
  99. //
  100. // Envoy currently holds the content of :ref:`direct response body
  101. // <envoy_v3_api_field_config.route.v3.DirectResponseAction.body>` in memory. Be careful setting
  102. // this to be larger than the default 4KB, since the allocated memory for direct response body
  103. // is not subject to data plane buffering controls.
  104. //
  105. google.protobuf.UInt32Value max_direct_response_body_size_bytes = 11;
  106. // [#not-implemented-hide:]
  107. // A list of plugins and their configurations which may be used by a
  108. // :ref:`envoy_v3_api_field_config.route.v3.RouteAction.cluster_specifier_plugin`
  109. // within the route. All *extension.name* fields in this list must be unique.
  110. repeated ClusterSpecifierPlugin cluster_specifier_plugins = 12;
  111. }
  112. // Configuration for a cluster specifier plugin.
  113. message ClusterSpecifierPlugin {
  114. // The name of the plugin and its opaque configuration.
  115. core.v3.TypedExtensionConfig extension = 1;
  116. }
  117. message Vhds {
  118. option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.Vhds";
  119. // Configuration source specifier for VHDS.
  120. core.v3.ConfigSource config_source = 1 [(validate.rules).message = {required: true}];
  121. }