🚀(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
|
kind: Job
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ $fullName }}-migrate
|
name: {{ $fullName }}-migrate
|
||||||
|
{{- with .Values.backend.migrateJobAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "desk.common.labels" (list . $component) | nindent 4 }}
|
{{- include "desk.common.labels" (list . $component) | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
|
|||||||
@@ -88,6 +88,9 @@ backend:
|
|||||||
## @param backend.sidecars Add sidecars containers to backend deployment
|
## @param backend.sidecars Add sidecars containers to backend deployment
|
||||||
sidecars: []
|
sidecars: []
|
||||||
|
|
||||||
|
## @param backend.migrateJobAnnotations Annotations for the migrate job
|
||||||
|
migrateJobAnnotations: {}
|
||||||
|
|
||||||
## @param backend.securityContext Configure backend Pod security context
|
## @param backend.securityContext Configure backend Pod security context
|
||||||
securityContext: null
|
securityContext: null
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ image:
|
|||||||
tag: "main"
|
tag: "main"
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
|
migrateJobAnnotations:
|
||||||
|
argocd.argoproj.io/hook: PreSync
|
||||||
|
argocd.argoproj.io/hook-delete-policy: HookSucceeded
|
||||||
envVars:
|
envVars:
|
||||||
DJANGO_CSRF_TRUSTED_ORIGINS: http://desk-staging.beta.numerique.gouv.fr,https://desk-staging.beta.numerique.gouv.fr
|
DJANGO_CSRF_TRUSTED_ORIGINS: http://desk-staging.beta.numerique.gouv.fr,https://desk-staging.beta.numerique.gouv.fr
|
||||||
DJANGO_CONFIGURATION: Production
|
DJANGO_CONFIGURATION: Production
|
||||||
|
|||||||
Reference in New Issue
Block a user