Ratelimit: Add default value to dynamic metadata action (#11873)

Modified dynamic_metadata action to now accept an optional default
value for instances where no value is queried from the dynamic metadata.

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

Mirrored from https://github.com/envoyproxy/envoy @ 3afa3b50eacfa39fa5b3518b05b03689dc56ef42
master-ci-test
data-plane-api(CircleCI) 5 years ago
parent dc4d4e1a09
commit c788f1a997
  1. 4
      envoy/config/route/v3/route_components.proto
  2. 4
      envoy/config/route/v4alpha/route_components.proto

@ -1490,6 +1490,10 @@ message RateLimit {
// Metadata struct that defines the key and path to retrieve the string value. A match will
// only happen if the value in the dynamic metadata is of type string.
type.metadata.v3.MetadataKey metadata_key = 2 [(validate.rules).message = {required: true}];
// An optional value to use if *metadata_key* is empty. If not set and
// no value is present under the metadata_key then no descriptor is generated.
string default_value = 3;
}
oneof action_specifier {

@ -1472,6 +1472,10 @@ message RateLimit {
// Metadata struct that defines the key and path to retrieve the string value. A match will
// only happen if the value in the dynamic metadata is of type string.
type.metadata.v3.MetadataKey metadata_key = 2 [(validate.rules).message = {required: true}];
// An optional value to use if *metadata_key* is empty. If not set and
// no value is present under the metadata_key then no descriptor is generated.
string default_value = 3;
}
oneof action_specifier {

Loading…
Cancel
Save