Skip to main content

ValkeyCache

resourceType redis · provider valkey · sharing Private · cleanup Delete

Provisions a sharded Valkey cluster (valkey-operator) with automatic failover. Cluster mode is always on: only DB 0 is available and multi-key commands must share a hash slot, so applications need a cluster-aware client.

Request it​

Add this to your PlatformApplication's spec.resourceRequirements (optional parameters are in the table below):

resourceRequirements:
- resourceType: redis
provider: valkey # selects this backend — the cluster default may differ
resourceName: my-redis # your handle — drives the env-var prefix + secret name

Parameters​

NameTypeRequiredDefaultDescription
shardsstringno3Number of shard groups. Each shard has one primary and N replicas.
replicasstringno1Number of replicas per shard group. 0 disables failover.
memorystringno256MiMemory per node. Applied as both request and limit, and maxmemory is set to 75% of it.
cpustringno100mCPU request per node. No CPU limit is set — throttling a latency-sensitive data plane costs more than it saves.
maxmemoryPolicystringnoallkeys-lruEviction policy once maxmemory is reached. Use noeviction only if the data cannot be regenerated — writes then fail instead of evicting.
valkeyVersionstringno9.0.0Valkey server version (image tag).
storageSizestringno—Persistent volume size per node (e.g. 10Gi). Omit for an in-memory-only cache.
reclaimPolicystringno—What happens to the persistent volumes when the cluster is deleted. Defaults to the operator's behaviour when unset.
nodeCapacityTypestringno—Pin pods to a Karpenter capacity type via a nodeSelector on 'karpenter.sh/capacity-type'. Leave unset to accept whatever the NodePool offers. The target NodePool must permit the requested type, or the pods stay Pending.

Connection​

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
  • username
  • password

Status​

FieldDescription
clusterNameName of the Valkey cluster.
endpointHeadless Service DNS name used as the cluster seed endpoint.
portValkey port.
readyShardsNumber of shard groups the operator reports ready. Empty until the cluster reports status; lower than the requested shard count while forming or partially scaled.

Auto-generated from the ValkeyCache XRD + redis--valkey ResourceCapability. Do not edit by hand.