36f3e5db by Adam Heath

Use an initContainer to populate and update the database.

1 parent f9742211
......@@ -54,12 +54,12 @@ spec:
done
{{- end }}
containers:
- name: {{ .Chart.Name }}
{{- define "moqui-container-pod" }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["java", "-server", "-XX:-OmitStackTraceInFastThrow", "-cp", ".", "MoquiStart"]
envFrom:
- configMapRef:
name: {{ include "moqui.fullname" . }}
......@@ -87,6 +87,16 @@ spec:
volumeMounts:
- mountPath: /opt/moqui/runtime/elasticsearch
name: disable-elasticsearch
{{- end }}
- name: load
{{ include "moqui-container-pod" . }}
args: ["load"]
containers:
- name: {{ .Chart.Name }}
{{ include "moqui-container-pod" . }}
args: ["run"]
ports:
- name: http-moqui
......