This commit is contained in:
tusuii
2026-02-19 19:34:26 +05:30
commit 4b26a49776
8 changed files with 495 additions and 0 deletions

59
02-redis.yaml Normal file
View File

@@ -0,0 +1,59 @@
# Redis — Deployment + Service
# Used by the backend for BullMQ job queues.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
namespace: ecommerce
labels:
app: redis
spec:
replicas: 1
selector:
matchLabels:
app: redis
template:
metadata:
labels:
app: redis
spec:
containers:
- name: redis
image: redis:7-alpine
ports:
- containerPort: 6379
command: ["redis-server", "--appendonly", "yes"]
resources:
requests:
cpu: "50m"
memory: "64Mi"
limits:
cpu: "200m"
memory: "256Mi"
readinessProbe:
exec:
command: ["redis-cli", "ping"]
initialDelaySeconds: 5
periodSeconds: 5
failureThreshold: 3
livenessProbe:
exec:
command: ["redis-cli", "ping"]
initialDelaySeconds: 15
periodSeconds: 10
---
apiVersion: v1
kind: Service
metadata:
name: redis
namespace: ecommerce
labels:
app: redis
spec:
type: ClusterIP
selector:
app: redis
ports:
- port: 6379
targetPort: 6379