From 08aa80def0812d339f4d55321f103331a169fe5e Mon Sep 17 00:00:00 2001 From: "update-envoy[bot]" <135279899+update-envoy[bot]@users.noreply.github.com> Date: Wed, 27 Sep 2023 13:52:13 +0000 Subject: [PATCH] redis proxy : read commands policy for prefix route (#29719) Signed-off-by: Liang Peng Mirrored from https://github.com/envoyproxy/envoy @ 0bc754a213b6cd28c7117c82de0f721bb19d6ef2 --- .../filters/network/redis_proxy/v3/redis_proxy.proto | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.proto b/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.proto index fba1c786..28e351fb 100644 --- a/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.proto +++ b/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.proto @@ -138,7 +138,7 @@ message RedisProxy { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.network.redis_proxy.v2.RedisProxy.PrefixRoutes"; - // [#next-free-field: 6] + // [#next-free-field: 7] message Route { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.network.redis_proxy.v2.RedisProxy.PrefixRoutes.Route"; @@ -168,6 +168,11 @@ message RedisProxy { bool exclude_read_commands = 3; } + // ReadCommandPolicy specifies that Envoy should route read commands to another cluster. + message ReadCommandPolicy { + string cluster = 1 [(validate.rules).string = {min_len: 1}]; + } + // String prefix that must match the beginning of the keys. Envoy will always favor the // longest match. string prefix = 1 [(validate.rules).string = {max_bytes: 1000}]; @@ -184,6 +189,9 @@ message RedisProxy { // Indicates how redis key should be formatted. To substitute redis key into the formatting // expression, use %KEY% as a string replacement command. string key_formatter = 5; + + // Indicates that the route has a read command policy + ReadCommandPolicy read_command_policy = 6; } reserved 3;