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.
This commit is contained in:
2026-08-27 20:46:34 +02:00
parent 2d078e10c0
commit cfd9317086
24 changed files with 597 additions and 8 deletions
@@ -0,0 +1,45 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
namespace: netbox
name: netbox-postgres
spec:
replicas: 1
serviceName: netbox-postgres
selector:
matchLabels:
app: netbox-postgres
template:
metadata:
labels:
app: netbox-postgres
spec:
restartPolicy: Always
terminationGracePeriodSeconds: 60
containers:
- name: netbox-postgres
image: postgres:18
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1000m"
ports:
- containerPort: 5432
volumeMounts:
- name: netbox-postgres-data
mountPath: /var/lib/postgresql/data
envFrom:
- secretRef:
name: netbox-postgres-secrets
readinessProbe:
exec:
command: ["sh", "-c", "pg_isready -q -U \"$POSTGRES_USER\" -d \"$POSTGRES_DB\""]
initialDelaySeconds: 10
periodSeconds: 10
volumes:
- name: netbox-postgres-data
persistentVolumeClaim:
claimName: netbox-postgres-pvc