fix actions

This commit is contained in:
2026-05-13 09:10:47 +02:00
parent a281d9cce9
commit d7ae020130
15 changed files with 327 additions and 1 deletions

View File

@@ -0,0 +1,35 @@
# https://kubernetes.io/docs/concepts/workloads/controllers/job/
apiVersion: batch/v1
kind: Job
metadata:
name: election-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: election-migration
spec:
template:
metadata:
name: election-migration
labels:
app: election-migration
spec:
containers:
- name: election-migration
image: election-migration
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: election
key: DATABASE_URL
restartPolicy: OnFailure
dnsPolicy: ClusterFirst