Matrix Authentication Service: migrate DB on init

This commit is contained in:
Andrew Ferrazzutti committed 2025-05-01 09:08:19 -04:00
1 parent 9ec6c26fb7
commit fcad1bcf86
1 file changed
+27 -1
@@ -135,9 +135,35 @@ spec:
resources:
{{- toYaml . | nindent 10 }}
{{- end }}
- name: database-migrate
args: ["database", "migrate"]
{{- with .image -}}
{{- if .digest }}
image: "{{ .registry }}/{{ .repository }}@{{ .digest }}"
imagePullPolicy: {{ .pullPolicy | default "IfNotPresent" }}
{{- else }}
image: "{{ .registry }}/{{ .repository }}:{{ required "matrixAuthenticationService.image.tag is required if no digest" .tag }}"
imagePullPolicy: {{ .pullPolicy | default "Always" }}
{{- end }}
{{- end }}
{{- with .containersSecurityContext }}
securityContext:
{{- toYaml . | nindent 10 }}
{{- end }}
env:
{{- include "element-io.matrix-authentication-service.env" (dict "root" $ "context" .) | nindent 10 }}
{{- with .resources }}
resources:
{{- toYaml . | nindent 10 }}
{{- end }}
volumeMounts:
- mountPath: "/config.yaml"
name: rendered-config
subPath: config.yaml
readOnly: true
containers:
- name: matrix-authentication-service
args: ["server"]
args: ["server", "--no-migrate"]
{{- with .image -}}
{{- if .digest }}
image: "{{ .registry }}/{{ .repository }}@{{ .digest }}"