Some checks failed
Build and Push Container Image / build-and-push (push) Failing after 3m14s
36 lines
915 B
YAML
36 lines
915 B
YAML
# https://kubernetes.io/docs/concepts/workloads/controllers/job/
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: taskarr-migration
|
|
annotations:
|
|
# 1. Tells Argo this is a hook to run during sync
|
|
argocd.argoproj.io/hook: Sync
|
|
|
|
# 2. Ensures the migration runs BEFORE the deployment
|
|
argocd.argoproj.io/sync-wave: "1"
|
|
|
|
# 3. Deletes the job after it succeeds so it can run again next time
|
|
argocd.argoproj.io/hook-delete-policy: BeforeHookCreation
|
|
labels:
|
|
app: taskarr-migration
|
|
spec:
|
|
template:
|
|
metadata:
|
|
name: taskarr-migration
|
|
labels:
|
|
app: taskarr-migration
|
|
spec:
|
|
containers:
|
|
- name: taskarr-migrator
|
|
image: migrator
|
|
env:
|
|
- name: DATABASE_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: election
|
|
key: DATABASE_URL
|
|
|
|
restartPolicy: OnFailure
|
|
dnsPolicy: ClusterFirst
|