diff --git a/envoy/config/route/v3/route_components.proto b/envoy/config/route/v3/route_components.proto index d58e6542..0d1d7cf4 100644 --- a/envoy/config/route/v3/route_components.proto +++ b/envoy/config/route/v3/route_components.proto @@ -997,7 +997,9 @@ message RouteAction { // limits. By default, if the route configured rate limits, the virtual host // :ref:`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 ` + 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 diff --git a/envoy/config/route/v4alpha/route_components.proto b/envoy/config/route/v4alpha/route_components.proto index 5ab5bcb1..8f57aa0d 100644 --- a/envoy/config/route/v4alpha/route_components.proto +++ b/envoy/config/route/v4alpha/route_components.proto @@ -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 ` 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 diff --git a/envoy/extensions/filters/http/ratelimit/v3/rate_limit.proto b/envoy/extensions/filters/http/ratelimit/v3/rate_limit.proto index 781fddc1..e16cf295 100644 --- a/envoy/extensions/filters/http/ratelimit/v3/rate_limit.proto +++ b/envoy/extensions/filters/http/ratelimit/v3/rate_limit.proto @@ -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}]; +}