router: Add support for per-route configurable maximum number of internal redirect hops (#9574)

Add support for per-route configurable maximum number of internal redirect hops

Risk Level: Medium
Testing: Unit and integration tests added / modified
Docs Changes: Described the new field in intro/arch_overview/http/http_connection_management.rst
Release Notes: Added

Fixes #9144

Signed-off-by: Peng Gao <pengg@google.com>

Mirrored from https://github.com/envoyproxy/envoy @ 1f208984f1eb6253c3f2ee49139831f6766b673e
master-ci-test
data-plane-api(CircleCI) 5 years ago
parent 6467390343
commit d19559df4a
  1. 18
      envoy/api/v2/route/route_components.proto
  2. 19
      envoy/config/route/v3alpha/route_components.proto

@ -518,7 +518,7 @@ message CorsPolicy {
core.RuntimeFractionalPercent shadow_enabled = 10;
}
// [#next-free-field: 31]
// [#next-free-field: 32]
message RouteAction {
enum ClusterNotFoundResponseCode {
// HTTP status code - 503 Service Unavailable.
@ -875,6 +875,22 @@ message RouteAction {
InternalRedirectAction internal_redirect_action = 26;
// An internal redirect is handled, iff the number of previous internal redirects that a
// downstream request has encountered is lower than this value, and
// :ref:`internal_redirect_action <envoy_api_field_route.RouteAction.internal_redirect_action>`
// is set to :ref:`HANDLE_INTERNAL_REDIRECT
// <envoy_api_enum_value_route.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
// In the case where a downstream request is bounced among multiple routes by internal redirect,
// the first route that hits this threshold, or has
// :ref:`internal_redirect_action <envoy_api_field_route.RouteAction.internal_redirect_action>`
// set to
// :ref:`PASS_THROUGH_INTERNAL_REDIRECT
// <envoy_api_enum_value_route.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
// will pass the redirect back to downstream.
//
// If not specified, at most one redirect will be followed.
google.protobuf.UInt32Value max_internal_redirects = 31;
// Indicates that the route has a hedge policy. Note that if this is set,
// it'll take precedence over the virtual host level hedge policy entirely
// (e.g.: policies are not merged, most internal one becomes the enforced policy).

@ -487,7 +487,7 @@ message CorsPolicy {
core.v3alpha.RuntimeFractionalPercent shadow_enabled = 10;
}
// [#next-free-field: 31]
// [#next-free-field: 32]
message RouteAction {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.RouteAction";
@ -853,6 +853,23 @@ message RouteAction {
InternalRedirectAction internal_redirect_action = 26;
// An internal redirect is handled, iff the number of previous internal redirects that a
// downstream request has encountered is lower than this value, and
// :ref:`internal_redirect_action
// <envoy_api_field_config.route.v3alpha.RouteAction.internal_redirect_action>` is set to
// :ref:`HANDLE_INTERNAL_REDIRECT
// <envoy_api_enum_value_config.route.v3alpha.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
// In the case where a downstream request is bounced among multiple routes by internal redirect,
// the first route that hits this threshold, or has
// :ref:`internal_redirect_action
// <envoy_api_field_config.route.v3alpha.RouteAction.internal_redirect_action>` set to
// :ref:`PASS_THROUGH_INTERNAL_REDIRECT
// <envoy_api_enum_value_config.route.v3alpha.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
// will pass the redirect back to downstream.
//
// If not specified, at most one redirect will be followed.
google.protobuf.UInt32Value max_internal_redirects = 31;
// Indicates that the route has a hedge policy. Note that if this is set,
// it'll take precedence over the virtual host level hedge policy entirely
// (e.g.: policies are not merged, most internal one becomes the enforced policy).

Loading…
Cancel
Save