chore(helm): rename jobs
This commit is contained in:
parent
b00c479496
commit
38c28dc73f
2 changed files with 2 additions and 2 deletions
26
charts/backoffice/templates/job-db-migration.yaml
Normal file
26
charts/backoffice/templates/job-db-migration.yaml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-db-migration
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade
|
||||
"helm.sh/hook-weight": "-10"
|
||||
"helm.sh/hook-delete-policy": before-hook-creation #,hook-succeeded
|
||||
spec:
|
||||
backoffLimit: 1
|
||||
ttlSecondsAfterFinished: 86400 # 1 day
|
||||
activeDeadlineSeconds: 120 # 2 minutes
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}-migration
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
command: ["npx", "prisma", "migrate", "deploy"]
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ .Release.Name }}-config
|
||||
- secretRef:
|
||||
name: {{ .Release.Name }}-database
|
||||
- secretRef:
|
||||
name: {{ .Release.Name }}-nextauth
|
||||
restartPolicy: Never
|
||||
Reference in a new issue