Make environment of migrate job identical to the regular web container deployment, as it should be.
This commit is contained in:
parent
74288199f6
commit
4c7256e5c9
|
@ -39,26 +39,20 @@ spec:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
command: {{ .Values.migrationJob.command | default (list "./manage.py" "migrate") | toJson }}
|
command: {{ .Values.migrationJob.command | default (list "./manage.py" "migrate") | toJson }}
|
||||||
env:
|
env:
|
||||||
- name: DEBUG
|
|
||||||
value: "False"
|
|
||||||
{{- if .Values.env.secret.DATABASE_URL }}
|
|
||||||
- name: DATABASE_URL
|
|
||||||
value: {{ .Values.env.secret.DATABASE_URL }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.postgresql.enabled }}
|
{{- if .Values.postgresql.enabled }}
|
||||||
- name: DATABASE_PASSWORD
|
- name: DATABASE_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ default (include "django.postgresql.fullname" .) .Values.postgresql.auth.existingSecret }}
|
name: {{ default (include "django.postgresql.fullname" .) .Values.postgresql.auth.existingSecret }}
|
||||||
key: postgres-password
|
key: postgres-password
|
||||||
{{- end }}
|
|
||||||
- name: SECRET_KEY
|
|
||||||
value: {{ required "env.secret.SECRET_KEY is a required value." .Values.env.secret.SECRET_KEY }}
|
|
||||||
{{- range $k, $v := .Values.env.normal }}
|
|
||||||
- name: {{ $k }}
|
|
||||||
value: {{ $v | quote }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
envFrom:
|
envFrom:
|
||||||
|
- secretRef:
|
||||||
|
name: {{ include "django.fullname" . }}
|
||||||
|
{{- if .Values.existingSecret }}
|
||||||
|
- secretRef:
|
||||||
|
name: {{ .Values.existingSecret }}
|
||||||
|
{{- end }}
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: {{ include "django.fullname" . }}
|
name: {{ include "django.fullname" . }}
|
||||||
{{- with .Values.extraVolumeMounts }}
|
{{- with .Values.extraVolumeMounts }}
|
||||||
|
|
Loading…
Reference in a new issue