Skip to content

Commit

Permalink
fix(#28): run a migration job prior to helm release
Browse files Browse the repository at this point in the history
  • Loading branch information
saylerb committed Apr 23, 2024
1 parent a67d4d8 commit dcd0d21
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions charts/lab-api-teams-chart/templates/migrate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: batch/v1
kind: Job
metadata:
name: lab-api-teams-migrate
annotations:
"helm.sh/hook": pre-upgrade,pre-install
"helm.sh/hook-weight": "1"
"helm.sh/hook-delete-policy": before-hook-creation
spec:
template:
spec:
containers:
- name: migrate
image: twdps/lab-api-teams-migrate:{{ .Values.image.tag }}
env:
- name: DATABASE_URL
value: {{ .Values.database.url }}
- name: DATABASE_PORT
value: {{ .Values.database.port | quote }}
restartPolicy: Never
backoffLimit: 4

0 comments on commit dcd0d21

Please sign in to comment.