grpc_stats filter: Add config options to restrict number of stats (#10467)
Add options to either put all methods into the same per-cluster stat, or to whitelist which methods to create stats for. Additionally, start a deprecation process for the default mode being to create a stat for all methods, to remove an unsafe default. Risk Level: Low Testing: Unit tests added Docs Changes: done Release Notes: added Fixes #10445 Deprecated: added Mirrored from https://github.com/envoyproxy/envoy @ 715992f3ac891d87e67566ffbfd6b3af8d8a4e1dmaster-ci-test
parent
03ef46cf33
commit
843c15a171
6 changed files with 127 additions and 1 deletions
@ -0,0 +1,28 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.api.v2.core; |
||||
|
||||
import "udpa/annotations/migrate.proto"; |
||||
import "udpa/annotations/status.proto"; |
||||
import "validate/validate.proto"; |
||||
|
||||
option java_package = "io.envoyproxy.envoy.api.v2.core"; |
||||
option java_outer_classname = "GrpcMethodListProto"; |
||||
option java_multiple_files = true; |
||||
option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; |
||||
option (udpa.annotations.file_status).package_version_status = ACTIVE; |
||||
|
||||
// [#protodoc-title: gRPC method list] |
||||
|
||||
// A list of gRPC methods which can be used as an allowlist, for example. |
||||
message GrpcMethodList { |
||||
message Service { |
||||
// The name of the gRPC service. |
||||
string name = 1 [(validate.rules).string = {min_bytes: 1}]; |
||||
|
||||
// The names of the gRPC methods in this service. |
||||
repeated string method_names = 2 [(validate.rules).repeated = {min_items: 1}]; |
||||
} |
||||
|
||||
repeated Service services = 1; |
||||
} |
@ -0,0 +1,32 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.config.core.v3; |
||||
|
||||
import "udpa/annotations/status.proto"; |
||||
import "udpa/annotations/versioning.proto"; |
||||
import "validate/validate.proto"; |
||||
|
||||
option java_package = "io.envoyproxy.envoy.config.core.v3"; |
||||
option java_outer_classname = "GrpcMethodListProto"; |
||||
option java_multiple_files = true; |
||||
option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; |
||||
|
||||
// [#protodoc-title: gRPC method list] |
||||
|
||||
// A list of gRPC methods which can be used as an allowlist, for example. |
||||
message GrpcMethodList { |
||||
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.GrpcMethodList"; |
||||
|
||||
message Service { |
||||
option (udpa.annotations.versioning).previous_message_type = |
||||
"envoy.api.v2.core.GrpcMethodList.Service"; |
||||
|
||||
// The name of the gRPC service. |
||||
string name = 1 [(validate.rules).string = {min_bytes: 1}]; |
||||
|
||||
// The names of the gRPC methods in this service. |
||||
repeated string method_names = 2 [(validate.rules).repeated = {min_items: 1}]; |
||||
} |
||||
|
||||
repeated Service services = 1; |
||||
} |
Loading…
Reference in new issue