# Introduction Redis [eviction policy](https://redis.io/docs/latest/operate/rs/databases/memory-performance/eviction-policy/) and [Key eviction](https://redis.io/docs/latest/develop/reference/eviction/) [Bullmq eviction recommendations](https://docs.bullmq.io/guide/going-to-production#max-memory-policy) We might need a dedicated bullmq redis instance, as sharing engine/metadata keys and bull will someday become problematic close https://github.com/twentyhq/core-team-issues/issues/452 About to open a PR for our internal IaC Ps: Did not set a `--maxmemory` that could be leading to undetermined OOOM errors at runtime. Should be user provided or should define a default value ?
46 lines
997 B
YAML
46 lines
997 B
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
app: twentycrm-redis
|
|
name: twentycrm-redis
|
|
namespace: twentycrm
|
|
spec:
|
|
progressDeadlineSeconds: 600
|
|
replicas: 1
|
|
strategy:
|
|
rollingUpdate:
|
|
maxSurge: 1
|
|
maxUnavailable: 1
|
|
type: RollingUpdate
|
|
selector:
|
|
matchLabels:
|
|
app: twentycrm-redis
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: twentycrm-redis
|
|
spec:
|
|
containers:
|
|
- name: redis
|
|
image: redis/redis-stack-server:latest
|
|
imagePullPolicy: Always
|
|
args: ["--maxmemory-policy", "noeviction"]
|
|
env:
|
|
- name: PORT
|
|
value: "6379"
|
|
ports:
|
|
- containerPort: 6379
|
|
name: redis
|
|
protocol: TCP
|
|
resources:
|
|
requests:
|
|
memory: "1024Mi"
|
|
cpu: "250m"
|
|
limits:
|
|
memory: "2048Mi"
|
|
cpu: "500m"
|
|
|
|
dnsPolicy: ClusterFirst
|
|
restartPolicy: Always
|