- Redis Configuration
- RedisDestination
- ConnectionPoolSettings
- Auth
- SecretReference
- PlainAuth
- RedisSettings
- TrafficPolicy
- RedisService
- Percent
- Fault
- RedisService.Settings
- RedisService.KeyMatch
- RedisService.RouteMatch
- RedisService.Destination
- RedisService.Mirror
- RedisService.Route
- google.protobuf.UInt32Value
- RedisSettings.Mode
- RedisSettings.Mode
- RedisService.ReadPolicy
- Fault.Type
- Fault.Type
- Fault.Type
- RedisService.ReadPolicy
- RedisService.ReadPolicy
Redis Configuration
Configuration for Redis traffic rules.
RedisDestination defines policies that apply to redis traffic intended for a redis service
RedisDestination
RedisDestination defines policies that apply to redis traffic intended for a redis service
Field | Type | Description | Required |
---|---|---|---|
host | string | Yes | |
trafficPolicy | TrafficPolicy | No |
ConnectionPoolSettings
Connection pool settings for an upstream host. The settings apply to each individual host in the upstream service.
Field | Type | Description | Required |
---|---|---|---|
tcp | TCPSettings | No | |
redis | RedisSettings | No |
Auth
Auth provide a way to get redis auth token.
Field | Type | Description | Required |
---|---|---|---|
secret | SecretReference (oneof) | Secret use the k8s secret in current namespace. | No |
plain | PlainAuth (oneof) | redis password. | No |
SecretReference
Field | Type | Description | Required |
---|---|---|---|
name | string | No | |
passwordField | string | No | |
usernameField | string | No |
PlainAuth
Field | Type | Description | Required |
---|---|---|---|
password | string | Yes | |
username | string | No |
RedisSettings
Field | Type | Description | Required |
---|---|---|---|
mode | Mode | No | |
auth | Auth | No | |
discoveryEndpoints | string[] | No |
TrafficPolicy
Field | Type | Description | Required |
---|---|---|---|
connectionPool | ConnectionPoolSettings | No |
RedisService
RedisService provide a way to config redis service in service mesh.
Field | Type | Description | Required |
---|---|---|---|
host | string[] | Yes | |
settings | Settings | No | |
redis | Route[] | Yes | |
faults | Fault[] | List of faults to inject. Faults currently come in two flavors: - Delay, which delays a request. - Error, which responds to a request with an error. Errors can also have delays attached. | No |
Percent
Percent specifies a percentage in the range of [0.0, 100.0].
Field | Type | Description | Required |
---|---|---|---|
value | double | No |
Fault
Fault defines redis faults used for fault injection.
Field | Type | Description | Required |
---|---|---|---|
type | Type | Fault type. | No |
percentage | Percent | Percentage of requests fault applies to. | No |
delay | Duration | Delay for all faults. If not set, defaults to zero | No |
commands | string[] | Commands fault is restricted to, if any. If not set, fault applies to all commands other than auth and ping (due to special handling of those commands in Envoy). | No |
RedisService.Settings
Field | Type | Description | Required |
---|---|---|---|
caseInsensitive | bool | Indicates that prefix matching should be case insensitive. | No |
opTimeout | Duration | Per-operation timeout in milliseconds. The timer starts when the first command of a pipeline is written to the backend connection. Each response received from Redis resets the timer since it signifies that the next command is being processed by the backend. The only exception to this behavior is when a connection to a backend is not yet established. In that case, the connect timeout on the cluster will govern the timeout until the connection is ready. | No |
enableCommandStats | bool | Enable per-command statistics per upstream cluster, in addition to the filter level aggregate count | No |
maxBufferSizeBeforeFlush | uint32 | Maximum size of encoded request buffer before flush is triggered and encoded requests are sent upstream. If this is unset, the buffer flushes whenever it receives data and performs no batching. This feature makes it possible for multiple clients to send requests to Envoy and have them batched- for example if one is running several worker processes, each with its own Redis connection. There is no benefit to using this with a single downstream process. Recommended size (if enabled) is 1024 bytes. | No |
bufferFlushTimeout | Duration | The encoded request buffer is flushed N milliseconds after the first request has been encoded, unless the buffer size has already exceeded | No |
maxUpstreamUnknownConnections | UInt32Value |
| No |
enableHashtagging | bool | Use hash tagging on every redis key to guarantee that keys with the same hash tag will be forwarded to the same upstream. The hash key used for determining the upstream in a consistent hash ring configuration will be computed from the hash tagged key instead of the whole key. The algorithm used to compute the hash tag is identical to the Examples:
| No |
enableRedirection | bool | Accept | No |
readPolicy | ReadPolicy | Read policy. The default is to read from the primary. | No |
auth | Auth | Downstream auth. | No |
RedisService.KeyMatch
KeyMatch match the redis key prefix;
Field | Type | Description | Required |
---|---|---|---|
prefix | string | String prefix that must match the beginning of the keys. Envoy will always favor the longest match. | No |
removePrefix | bool | Indicates if the prefix needs to be removed from the key when forwarded. | No |
RedisService.RouteMatch
Field | Type | Description | Required |
---|---|---|---|
key | KeyMatch (oneof) | No |
RedisService.Destination
Field | Type | Description | Required |
---|---|---|---|
host | string | Yes | |
port | uint32 | No |
RedisService.Mirror
Field | Type | Description | Required |
---|---|---|---|
route | Destination | No | |
percentage | Percent | No | |
excludeReadCommands | bool | No |
RedisService.Route
Field | Type | Description | Required |
---|---|---|---|
match | RouteMatch | No | |
route | Destination | No | |
mirror | Mirror[] | No |
google.protobuf.UInt32Value
Wrapper message for uint32
.
The JSON representation for UInt32Value
is JSON number.
Field | Type | Description | Required |
---|---|---|---|
value | uint32 | The uint32 value. | No |
RedisSettings.Mode
Name | Description |
---|---|
PROXY | |
CLUSTER |
RedisSettings.Mode
Name | Description |
---|---|
PROXY | |
CLUSTER |
RedisService.ReadPolicy
Name | Description |
---|---|
MASTER | |
PREFER_MASTER | |
REPLICA | |
PREFER_REPLICA | |
ANY |
Fault.Type
Name | Description |
---|---|
DELAY | Delays requests. This is the base fault; other faults can have delays added. |
ERROR | Returns errors on requests. |
Fault.Type
Name | Description |
---|---|
DELAY | Delays requests. This is the base fault; other faults can have delays added. |
ERROR | Returns errors on requests. |
Fault.Type
Name | Description |
---|---|
DELAY | Delays requests. This is the base fault; other faults can have delays added. |
ERROR | Returns errors on requests. |
RedisService.ReadPolicy
Name | Description |
---|---|
MASTER | |
PREFER_MASTER | |
REPLICA | |
PREFER_REPLICA | |
ANY |
RedisService.ReadPolicy
Name | Description |
---|---|
MASTER | |
PREFER_MASTER | |
REPLICA | |
PREFER_REPLICA | |
ANY |
Last modified May 23, 2022: 增加 v1.1 文档目录 (431bf1a)