ratelimit: add support for rate limit service config in filters (#5242)

Signed-off-by: Rama Chavali <rama.rao@salesforce.com>

Mirrored from https://github.com/envoyproxy/envoy @ 494535f71a1befbaec21ad3aea710186ed2ac8ca
pull/620/head
data-plane-api(CircleCI) 6 years ago
parent 2b941bd6c8
commit dc8b16323e
  1. 2
      envoy/config/bootstrap/v2/bootstrap.proto
  2. 3
      envoy/config/filter/http/rate_limit/v2/BUILD
  3. 9
      envoy/config/filter/http/rate_limit/v2/rate_limit.proto
  4. 5
      envoy/config/filter/network/rate_limit/v2/BUILD
  5. 9
      envoy/config/filter/network/rate_limit/v2/rate_limit.proto
  6. 5
      envoy/config/filter/thrift/rate_limit/v2alpha1/BUILD
  7. 9
      envoy/config/filter/thrift/rate_limit/v2alpha1/rate_limit.proto
  8. 4
      envoy/config/ratelimit/v2/BUILD

@ -114,7 +114,7 @@ message Bootstrap {
// Configuration for an external rate limit service provider. If not
// specified, any calls to the rate limit service will immediately return
// success.
envoy.config.ratelimit.v2.RateLimitServiceConfig rate_limit_service = 10;
envoy.config.ratelimit.v2.RateLimitServiceConfig rate_limit_service = 10 [deprecated = true];
// Configuration for the runtime configuration provider. If not specified, a
// null provider will be used which will result in all defaults being used.

@ -5,4 +5,7 @@ licenses(["notice"]) # Apache 2
api_proto_library_internal(
name = "rate_limit",
srcs = ["rate_limit.proto"],
deps = [
"//envoy/config/ratelimit/v2:rls",
],
)

@ -3,6 +3,8 @@ syntax = "proto3";
package envoy.config.filter.http.rate_limit.v2;
option go_package = "v2";
import "envoy/config/ratelimit/v2/rls.proto";
import "google/protobuf/duration.proto";
import "validate/validate.proto";
@ -45,4 +47,11 @@ message RateLimit {
// of the default `UNAVAILABLE` gRPC code for a rate limited gRPC call. The
// HTTP code will be 200 for a gRPC response.
bool rate_limited_as_resource_exhausted = 6;
// Configuration for an external rate limit service provider. If not
// specified, any calls to the rate limit service will immediately return
// success.
// [#comment:TODO(ramaraochavali): Make this required as part of cleanup of deprecated ratelimit
// service config in bootstrap.]
envoy.config.ratelimit.v2.RateLimitServiceConfig rate_limit_service = 7;
}

@ -5,5 +5,8 @@ licenses(["notice"]) # Apache 2
api_proto_library_internal(
name = "rate_limit",
srcs = ["rate_limit.proto"],
deps = ["//envoy/api/v2/ratelimit"],
deps = [
"//envoy/api/v2/ratelimit",
"//envoy/config/ratelimit/v2:rls",
],
)

@ -4,6 +4,8 @@ package envoy.config.filter.network.rate_limit.v2;
option go_package = "v2";
import "envoy/api/v2/ratelimit/ratelimit.proto";
import "envoy/config/ratelimit/v2/rls.proto";
import "google/protobuf/duration.proto";
import "validate/validate.proto";
@ -32,4 +34,11 @@ message RateLimit {
// communication failure between rate limiting service and the proxy.
// Defaults to false.
bool failure_mode_deny = 5;
// Configuration for an external rate limit service provider. If not
// specified, any calls to the rate limit service will immediately return
// success.
// [#comment:TODO(ramaraochavali): Make this required as part of cleanup of deprecated ratelimit
// service config in bootstrap.]
envoy.config.ratelimit.v2.RateLimitServiceConfig rate_limit_service = 6;
}

@ -5,5 +5,8 @@ licenses(["notice"]) # Apache 2
api_proto_library_internal(
name = "rate_limit",
srcs = ["rate_limit.proto"],
deps = ["//envoy/api/v2/ratelimit"],
deps = [
"//envoy/api/v2/ratelimit",
"//envoy/config/ratelimit/v2:rls",
],
)

@ -3,6 +3,8 @@ syntax = "proto3";
package envoy.config.filter.thrift.rate_limit.v2alpha1;
option go_package = "v2alpha1";
import "envoy/config/ratelimit/v2/rls.proto";
import "google/protobuf/duration.proto";
import "validate/validate.proto";
@ -36,4 +38,11 @@ message RateLimit {
// communication failure between rate limiting service and the proxy.
// Defaults to false.
bool failure_mode_deny = 4;
// Configuration for an external rate limit service provider. If not
// specified, any calls to the rate limit service will immediately return
// success.
// [#comment:TODO(ramaraochavali): Make this required as part of cleanup of deprecated ratelimit
// service config in bootstrap.]
envoy.config.ratelimit.v2.RateLimitServiceConfig rate_limit_service = 5;
}

@ -5,9 +5,7 @@ licenses(["notice"]) # Apache 2
api_proto_library_internal(
name = "rls",
srcs = ["rls.proto"],
visibility = [
"//envoy/config/bootstrap/v2:__pkg__",
],
visibility = ["//visibility:public"],
deps = [
"//envoy/api/v2/core:grpc_service",
],

Loading…
Cancel
Save