component-redis
A small Redis instance for a project. Single-replica Deployment + ClusterIP Service on port 6379.
warning
Not persistent. Suitable for caching / queues that tolerate data loss on restart. If you need persistence, use a real Redis operator outside this chart.
Enable it
component-redis:
enabled: true
Defaults
image:
repository: redis
tag: "7"
pullPolicy: IfNotPresent
containerPort: 6379
maxmemory: "" # e.g. "1gb"; empty = unbounded
maxmemoryPolicy: volatile-lru # only evicts keys with a TTL (cache), never queue jobs or sessions
extraArgs: [] # extra redis-server arguments
resources:
requests: { cpu: 50m, memory: 64Mi }
limits: { cpu: 250m, memory: 256Mi }
Craft sites keep their whole cache in Redis (24h TTL). Size it from the current working set, for example:
component-redis:
enabled: true
maxmemory: 1gb
resources:
requests: { cpu: 100m, memory: 512Mi }
limits: { cpu: 500m, memory: 1280Mi }
Keep resources.limits.memory about 25% above maxmemory. Without maxmemory Redis grows until the limit kills
it, and the queue in the same instance loses its in-flight jobs.
How to reach it
The service is named redis-service in the project namespace. Connection string for your app:
redis://redis-service:6379