Merge branch 'master' into 'master'

Add `fail` function to mitigate breaking change on preInstall -> migrationJob

See merge request burke-software/django-helm-chart!19
This commit is contained in:
Stanislas Bruhiere 2024-07-18 16:45:47 +00:00
commit 2b530bb685

View file

@ -1,3 +1,7 @@
{{- if .Values.preInstall -}}
{{- fail ".Values.preInstall was moved to .Values.migrationJob, update your values accordingly" -}}
{{- end -}}
{{- if .Values.migrationJob.enabled -}}
apiVersion: batch/v1
kind: Job
@ -34,7 +38,7 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.migrationJob.resources }}
{{- if .Values.migrationJob.resources }}
resources: {{ toYaml .Values.migrationJob.resources | nindent 12 }}
{{- end }}
command: {{ .Values.migrationJob.command | default (list "./manage.py" "migrate") | toJson }}