router: ability to use query parameters in HTTP hash policy (#9085)

Signed-off-by: Stephan Zuercher <zuercher@gmail.com>

Mirrored from https://github.com/envoyproxy/envoy @ d9e14931485da3aee89ada5f5497adf7af269ae4
master-ci-test
data-plane-api(CircleCI) 5 years ago
parent 105c4672ad
commit e8d789bd7a
  1. 11
      envoy/api/v2/route/route.proto
  2. 14
      envoy/api/v3alpha/route/route.proto

@ -573,6 +573,7 @@ message RouteAction {
// Specifies the route's hashing policy if the upstream cluster uses a hashing :ref:`load balancer
// <arch_overview_load_balancing_types>`.
// [#next-free-field: 6]
message HashPolicy {
message Header {
// The name of the request header that will be used to obtain the hash
@ -615,6 +616,13 @@ message RouteAction {
bool source_ip = 1;
}
message QueryParameter {
// The name of the URL query parameter that will be used to obtain the hash
// key. If the parameter is not present, no hash will be produced. Query
// parameter names are case-sensitive.
string name = 1 [(validate.rules).string = {min_bytes: 1}];
}
oneof policy_specifier {
option (validate.required) = true;
@ -626,6 +634,9 @@ message RouteAction {
// Connection properties hash policy.
ConnectionProperties connection_properties = 3;
// Query parameter hash policy.
QueryParameter query_parameter = 5;
}
// The flag that short-circuits the hash computing. This field provides a

@ -541,6 +541,7 @@ message RouteAction {
// Specifies the route's hashing policy if the upstream cluster uses a hashing :ref:`load balancer
// <arch_overview_load_balancing_types>`.
// [#next-free-field: 6]
message HashPolicy {
option (udpa.api.annotations.versioning).previous_message_type =
"envoy.api.v2.route.RouteAction.HashPolicy";
@ -595,6 +596,16 @@ message RouteAction {
bool source_ip = 1;
}
message QueryParameter {
option (udpa.api.annotations.versioning).previous_message_type =
"envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter";
// The name of the URL query parameter that will be used to obtain the hash
// key. If the parameter is not present, no hash will be produced. Query
// parameter names are case-sensitive.
string name = 1 [(validate.rules).string = {min_bytes: 1}];
}
oneof policy_specifier {
option (validate.required) = true;
@ -606,6 +617,9 @@ message RouteAction {
// Connection properties hash policy.
ConnectionProperties connection_properties = 3;
// Query parameter hash policy.
QueryParameter query_parameter = 5;
}
// The flag that short-circuits the hash computing. This field provides a

Loading…
Cancel
Save