Use an initContainer to populate and update the database.
Showing
1 changed file
with
12 additions
and
2 deletions
... | @@ -54,12 +54,12 @@ spec: | ... | @@ -54,12 +54,12 @@ spec: |
54 | done | 54 | done |
55 | {{- end }} | 55 | {{- end }} |
56 | 56 | ||
57 | containers: | 57 | {{- define "moqui-container-pod" }} |
58 | - name: {{ .Chart.Name }} | ||
59 | securityContext: | 58 | securityContext: |
60 | {{- toYaml .Values.securityContext | nindent 12 }} | 59 | {{- toYaml .Values.securityContext | nindent 12 }} |
61 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" | 60 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" |
62 | imagePullPolicy: {{ .Values.image.pullPolicy }} | 61 | imagePullPolicy: {{ .Values.image.pullPolicy }} |
62 | command: ["java", "-server", "-XX:-OmitStackTraceInFastThrow", "-cp", ".", "MoquiStart"] | ||
63 | envFrom: | 63 | envFrom: |
64 | - configMapRef: | 64 | - configMapRef: |
65 | name: {{ include "moqui.fullname" . }} | 65 | name: {{ include "moqui.fullname" . }} |
... | @@ -87,6 +87,16 @@ spec: | ... | @@ -87,6 +87,16 @@ spec: |
87 | volumeMounts: | 87 | volumeMounts: |
88 | - mountPath: /opt/moqui/runtime/elasticsearch | 88 | - mountPath: /opt/moqui/runtime/elasticsearch |
89 | name: disable-elasticsearch | 89 | name: disable-elasticsearch |
90 | {{- end }} | ||
91 | |||
92 | - name: load | ||
93 | {{ include "moqui-container-pod" . }} | ||
94 | args: ["load"] | ||
95 | |||
96 | containers: | ||
97 | - name: {{ .Chart.Name }} | ||
98 | {{ include "moqui-container-pod" . }} | ||
99 | args: ["run"] | ||
90 | 100 | ||
91 | ports: | 101 | ports: |
92 | - name: http-moqui | 102 | - name: http-moqui | ... | ... |
-
Please register or sign in to post a comment