🚀(helm) transform migrate job to Presync job
Apply db migration before syncing all the pods. It avoids triggering errors when running the migrate job.
This commit is contained in:
committed by
aleb_the_flash
parent
1c4efd523b
commit
7c488a9807
@@ -5,6 +5,10 @@ apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ $fullName }}-migrate
|
||||
{{- with .Values.backend.migrateJobAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "desk.common.labels" (list . $component) | nindent 4 }}
|
||||
spec:
|
||||
|
||||
@@ -88,6 +88,9 @@ backend:
|
||||
## @param backend.sidecars Add sidecars containers to backend deployment
|
||||
sidecars: []
|
||||
|
||||
## @param backend.migrateJobAnnotations Annotations for the migrate job
|
||||
migrateJobAnnotations: {}
|
||||
|
||||
## @param backend.securityContext Configure backend Pod security context
|
||||
securityContext: null
|
||||
|
||||
|
||||
@@ -4,6 +4,9 @@ image:
|
||||
tag: "main"
|
||||
|
||||
backend:
|
||||
migrateJobAnnotations:
|
||||
argocd.argoproj.io/hook: PreSync
|
||||
argocd.argoproj.io/hook-delete-policy: HookSucceeded
|
||||
envVars:
|
||||
DJANGO_CSRF_TRUSTED_ORIGINS: http://desk-staging.beta.numerique.gouv.fr,https://desk-staging.beta.numerique.gouv.fr
|
||||
DJANGO_CONFIGURATION: Production
|
||||
|
||||
Reference in New Issue
Block a user