Files
Kubernetes-Manifests/applications/netbox/redis-cache/deployment.yaml
T
Jeffrey cfd9317086 netbox: add NetBox 4.6.8 with postgres, valkey and rqworker
Five components under applications/netbox: the web pod, an rqworker,
a daily housekeeping CronJob, postgres 18 and two valkey instances.
The task queue runs appendonly on its own PVC so queued jobs survive a
restart, while the cache instance is disposable.

Worker and cronjob override args rather than command, which replaces
CMD while keeping tini as the entrypoint, so only the web pod runs
migrations. Media, reports and scripts share one RWX PVC via subPaths
because both the web pod and the worker mount them.

Exposed on the internal gateway only.
2026-08-27 20:46:34 +02:00

39 lines
1.0 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
namespace: netbox
name: netbox-redis-cache
spec:
replicas: 1
selector:
matchLabels:
app: netbox-redis-cache
template:
metadata:
labels:
app: netbox-redis-cache
spec:
restartPolicy: Always
containers:
- name: netbox-redis-cache
image: valkey/valkey:9.1-alpine
# Cache only: no persistence, contents are disposable.
command: ["sh", "-c", "exec valkey-server --requirepass \"$REDIS_PASSWORD\""]
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "256Mi"
cpu: "200m"
ports:
- containerPort: 6379
envFrom:
- secretRef:
name: netbox-redis-cache-secrets
readinessProbe:
exec:
command: ["sh", "-c", "valkey-cli --pass \"$REDIS_PASSWORD\" ping | grep -q PONG"]
initialDelaySeconds: 5
periodSeconds: 10