fix(dispatch): tweaks to get initial deployment working
This commit is contained in:
parent
67ba9898b9
commit
f172764722
2 changed files with 31 additions and 7 deletions
|
@ -15,12 +15,6 @@ spec:
|
||||||
labels:
|
labels:
|
||||||
app: {{ include "dispatch.fullname" . }}-core
|
app: {{ include "dispatch.fullname" . }}-core
|
||||||
spec:
|
spec:
|
||||||
initContainers:
|
|
||||||
- name: db-init
|
|
||||||
image: "{{ .Values.initContainers.dbInit.image.registry }}:{{ .Values.initContainers.dbInit.image.tag }}"
|
|
||||||
envFrom:
|
|
||||||
- secretRef:
|
|
||||||
name: {{ .Values.postgres.secretName }}
|
|
||||||
{{ if ne .Values.image.pullSecret "" }}
|
{{ if ne .Values.image.pullSecret "" }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: "{{ .Values.image.pullSecret }}"
|
- name: "{{ .Values.image.pullSecret }}"
|
||||||
|
|
|
@ -26,7 +26,37 @@ spec:
|
||||||
image: "{{ coalesce $.Values.image.registry .registry }}/{{ .repository }}:{{ .tag | default $.Chart.AppVersion }}"
|
image: "{{ coalesce $.Values.image.registry .registry }}/{{ .repository }}:{{ .tag | default $.Chart.AppVersion }}"
|
||||||
imagePullPolicy: {{ coalesce $.Values.image.pullPolicy .pullPolicy }}
|
imagePullPolicy: {{ coalesce $.Values.image.pullPolicy .pullPolicy }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
command: ["dispatch", "database", "init"]
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
dispatch database init || true
|
||||||
|
env: &dispatchEnv
|
||||||
|
- name: MJML_PATH
|
||||||
|
value: /node_modules/.bin
|
||||||
|
- name: DISPATCH_UI_URL
|
||||||
|
value: "{{ .Values.url }}"
|
||||||
|
- name: DATABASE_HOSTNAME
|
||||||
|
value: "{{ .Values.postgres.hostname }}"
|
||||||
|
- name: DATABASE_PORT
|
||||||
|
value: "{{ .Values.postgres.port }}"
|
||||||
|
- name: DATABASE_NAME
|
||||||
|
value: "{{ .Values.postgres.database_name }}"
|
||||||
|
{{ if eq .Values.authentication.provider_slug "dispatch-auth-provider-header" }}
|
||||||
|
- name: DISPATCH_AUTHENTICATION_PROVIDER_SLUG
|
||||||
|
value: "{{ .Values.authentication.provider_slug }}"
|
||||||
|
- name: DISPATCH_AUTHENTICATION_PROVIDER_HEADER_NAME
|
||||||
|
value: "{{ .Values.authentication.header.header_name }}"
|
||||||
|
{{ end }}
|
||||||
|
envFrom:
|
||||||
|
- secretRef:
|
||||||
|
name: {{ .Values.envFromSecret }}
|
||||||
|
- name: dispatch-db-upgrade
|
||||||
|
{{- with .Values.image }}
|
||||||
|
image: "{{ coalesce $.Values.image.registry .registry }}/{{ .repository }}:{{ .tag | default $.Chart.AppVersion }}"
|
||||||
|
imagePullPolicy: {{ coalesce $.Values.image.pullPolicy .pullPolicy }}
|
||||||
|
{{- end }}
|
||||||
|
command: ["dispatch", "database", "upgrade"]
|
||||||
env: &dispatchEnv
|
env: &dispatchEnv
|
||||||
- name: MJML_PATH
|
- name: MJML_PATH
|
||||||
value: /node_modules/.bin
|
value: /node_modules/.bin
|
||||||
|
|
Loading…
Reference in a new issue