Skip to main content
// 04 operate

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​

NameTypeRequiredDefaultDescription
replicasstringno2Number 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.
memorystringno256MiMemory per Redis pod. Applied as both request and limit, and maxmemory is set to 75% of it.
cpustringno100mCPU request per Redis pod. No CPU limit is set.
maxmemoryPolicystringnonoevictionEviction 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.
redisVersionstringnov8.10.1Redis version: the tag of the quay.io/opstree/redis and redis-sentinel images.
redisImageDigeststringno—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.
sentinelImageDigeststringno—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.
storageSizestringno1GiPersistent volume size per Redis pod. Persistence is always on; without it a restarted primary can come back empty and be re-elected.
sentinelAuthstringnoenabledWhether 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.
nodeCapacityTypestringno—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, …:

  • host
  • port
  • masterName
  • username
  • password
  • sentinelPassword

Status​

FieldDescription
clusterNameName of the RedisReplication.
endpointSentinel Service DNS name. It resolves to every Sentinel.
portSentinel port.
masterNameSentinel master group name to ask for the primary.
masterNodePod 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.