diff --git a/charts/matrix-stack/templates/matrix-authentication-service/deployment.yaml b/charts/matrix-stack/templates/matrix-authentication-service/deployment.yaml index d54d3c73..e7071c07 100644 --- a/charts/matrix-stack/templates/matrix-authentication-service/deployment.yaml +++ b/charts/matrix-stack/templates/matrix-authentication-service/deployment.yaml @@ -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 }}"