nxtgauge-gitops/apps/nxtgauge-backend-rust/base/migration-job.yaml
2026-04-15 13:50:45 +02:00

38 lines
963 B
YAML

apiVersion: batch/v1
kind: Job
metadata:
name: nxtgauge-db-migrate
namespace: nxtgauge
labels:
app: nxtgauge-db-migrate
tier: database
annotations:
description: "Runs database migrations for nxtgauge backend"
spec:
ttlSecondsAfterFinished: 300
backoffLimit: 3
template:
metadata:
labels:
app: nxtgauge-db-migrate
spec:
restartPolicy: OnFailure
containers:
- name: migrate
image: registry.nxtgauge.com/nxtgauge-db-migrate:latest
imagePullPolicy: Always
envFrom:
- secretRef:
name: nxtgauge-backend-rust-secrets
env:
- name: MIGRATIONS_DIR
value: "/migrations"
- name: DROP_EXISTING_TABLES
value: "true"
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "256Mi"
cpu: "500m"