feat(k8s): add database migration job manifest
This commit is contained in:
parent
7ed7b47fd1
commit
7b6cb67edc
1 changed files with 36 additions and 0 deletions
36
apps/nxtgauge-backend-rust/base/migration-job.yaml
Normal file
36
apps/nxtgauge-backend-rust/base/migration-job.yaml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
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:5000/nxtgauge-db-migrate:latest
|
||||
imagePullPolicy: Always
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: nxtgauge-backend-rust-secrets
|
||||
env:
|
||||
- name: MIGRATIONS_DIR
|
||||
value: "/migrations"
|
||||
resources:
|
||||
requests:
|
||||
memory: "64Mi"
|
||||
cpu: "50m"
|
||||
limits:
|
||||
memory: "256Mi"
|
||||
cpu: "500m"
|
||||
Loading…
Add table
Reference in a new issue