Introduce vh_rate_limits option and deprecate include_vh_rate_limits (#12855)

Deprecated include_vh_rate_limits in favor of an enum setting vh_rate_limits.

Signed-off-by: Clara Andrew-Wani <candrewwani@gmail.com>

Mirrored from https://github.com/envoyproxy/envoy @ 433e88463fa52986b8071b2738bfdda5b8062b4d
master-ci-test
data-plane-api(CircleCI) 4 years ago
parent c453c0bc41
commit 916abd5d6a
  1. 4
      envoy/config/route/v3/route_components.proto
  2. 11
      envoy/config/route/v4alpha/route_components.proto
  3. 16
      envoy/extensions/filters/http/ratelimit/v3/rate_limit.proto

@ -997,7 +997,9 @@ message RouteAction {
// limits. By default, if the route configured rate limits, the virtual host
// :ref:`rate_limits <envoy_api_field_config.route.v3.VirtualHost.rate_limits>` are not applied to the
// request.
google.protobuf.BoolValue include_vh_rate_limits = 14;
//
// This field is deprecated. Please use :ref:`vh_rate_limits <envoy_v3_api_field_extensions.filters.http.ratelimit.v3.RateLimitPerRoute.vh_rate_limits>`
google.protobuf.BoolValue include_vh_rate_limits = 14 [deprecated = true];
// Specifies a list of hash policies to use for ring hash load balancing. Each
// hash policy is evaluated individually and the combined result is used to

@ -788,9 +788,10 @@ message RouteAction {
google.protobuf.Duration grpc_timeout_offset = 3;
}
reserved 12, 18, 19, 16, 22, 21, 10, 26, 31;
reserved 12, 18, 19, 16, 22, 21, 10, 14, 26, 31;
reserved "request_mirror_policy", "internal_redirect_action", "max_internal_redirects";
reserved "request_mirror_policy", "include_vh_rate_limits", "internal_redirect_action",
"max_internal_redirects";
oneof cluster_specifier {
option (validate.required) = true;
@ -992,12 +993,6 @@ message RouteAction {
// route.
repeated RateLimit rate_limits = 13;
// Specifies if the rate limit filter should include the virtual host rate
// limits. By default, if the route configured rate limits, the virtual host
// :ref:`rate_limits <envoy_api_field_config.route.v4alpha.VirtualHost.rate_limits>` are not applied to the
// request.
google.protobuf.BoolValue include_vh_rate_limits = 14;
// Specifies a list of hash policies to use for ring hash load balancing. Each
// hash policy is evaluated individually and the combined result is used to
// route the request. The method of combination is deterministic such that

@ -100,3 +100,19 @@ message RateLimit {
XRateLimitHeadersRFCVersion enable_x_ratelimit_headers = 8
[(validate.rules).enum = {defined_only: true}];
}
message RateLimitPerRoute {
enum VhRateLimitsOptions {
// Use the virtual host rate limits unless the route has a rate limit policy.
OVERRIDE = 0;
// Use the virtual host rate limits even if the route has a rate limit policy.
INCLUDE = 1;
// Ignore the virtual host rate limits even if the route does not have a rate limit policy.
IGNORE = 2;
}
// Specifies if the rate limit filter should include the virtual host rate limits.
VhRateLimitsOptions vh_rate_limits = 1 [(validate.rules).enum = {defined_only: true}];
}

Loading…
Cancel
Save