RedisCache
resourceType redis · provider sentinel · sharing Private · cleanup Delete
Provisions a non-clustered Redis (one primary, N replicas, three Sentinels; OT-Container-Kit redis-operator) for clients that need multi-key transactions or scripts across arbitrary keys, such as ARQ and other job queues. Clients must connect through Sentinel: the connection secret's host is the Sentinel Service and masterName is the group to ask for. Failover takes about 7 seconds. Data is persisted (AOF, fsync every second). Redis pods and Sentinels are each spread one per node, so the cluster needs at least replicas+1 schedulable nodes, and never fewer than 3 (for the Sentinels); with fewer, pods stay Pending and the claim never becomes Ready.
Request it
Add this to your PlatformApplication's spec.resourceRequirements (optional parameters are in the table below):
resourceRequirements:
- resourceType: redis
provider: sentinel # selects this backend — the cluster default may differ
resourceName: my-redis # your handle — drives the env-var prefix + secret name
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
replicas | string | no | 2 | Number of replicas besides the primary. Each Redis pod runs on its own node, so the cluster needs replicas+1 schedulable nodes, and at least 3 for the Sentinels. |
memory | string | no | 256Mi | Memory per Redis pod. Applied as both request and limit, and maxmemory is set to 75% of it. |
cpu | string | no | 100m | CPU request per Redis pod. No CPU limit is set. |
maxmemoryPolicy | string | no | noeviction | Eviction policy once maxmemory is reached. The default, noeviction, makes writes fail when memory is full instead of silently dropping keys such as queued jobs. Use allkeys-lru for a pure cache. |
redisVersion | string | no | v8.10.1 | Redis version: the tag of the quay.io/opstree/redis and redis-sentinel images. |
redisImageDigest | string | no | — | Optional digest (sha256:...) to pin the quay.io/opstree/redis image, which also runs the replica-watchdog sidecar. Unset uses the redisVersion tag as is. |
sentinelImageDigest | string | no | — | Optional digest (sha256:...) to pin the quay.io/opstree/redis-sentinel image. It differs from the Redis image's digest. Unset uses the redisVersion tag as is. |
storageSize | string | no | 1Gi | Persistent volume size per Redis pod. Persistence is always on; without it a restarted primary can come back empty and be re-elected. |
sentinelAuth | string | no | enabled | Whether the Sentinel port requires sentinelPassword. Set disabled only for clients that cannot send a Sentinel password, such as ARQ. Data access still needs the Redis password. Cannot be changed after creation; recreate the claim to switch. |
nodeCapacityType | string | no | — | Pin pods to a Karpenter capacity type via a nodeSelector on 'karpenter.sh/capacity-type'. Leave unset to accept whatever the NodePool offers. |
Connection
You don't create or manage these credentials. The platform generates them, so there is no secret for you to define. Don't add this resource to spec.secrets: that field is for secret values you write yourself, such as API keys (see Azure Key Vault Secret Management).
On grant, a connection secret is published with these tokens and injected into your workload as {RESOURCENAME}_{TOKEN} (UPPER_SNAKE) — e.g. resourceName: my-redis → MY_REDIS_HOST, MY_REDIS_PORT, …:
hostportmasterNameusernamepasswordsentinelPassword
Status
| Field | Description |
|---|---|
clusterName | Name of the RedisReplication. |
endpoint | Sentinel Service DNS name. It resolves to every Sentinel. |
port | Sentinel port. |
masterName | Sentinel master group name to ask for the primary. |
masterNode | Pod the operator reports as primary. Empty until a primary is elected; the claim is not Ready until then. |
Auto-generated from the RedisCache XRD + redis--sentinel ResourceCapability. Do not edit by hand.