feat(matrix-authentication-service): add postgres init

This commit is contained in:
Tommy 2024-04-12 17:13:55 +02:00
parent 831a384491
commit b9364370ab
No known key found for this signature in database
2 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,20 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "matrix-authentication-service.fullname" . }}-db-init
labels:
{{- include "matrix-authentication-service.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": pre-install
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
spec:
template:
spec:
restartPolicy: Never
containers:
- name: general-db-init
image: "{{ .Values.initContainers.dbInit.image.repository }}:{{ .Values.initContainers.dbInit.image.tag }}"
envFrom:
- secretRef:
name: {{ .Values.postgres.secretName }}
backoffLimit: 3

View file

@ -3,6 +3,18 @@ fullnameOverride: ""
existingSecretConfigMap: matrix-authentication-service-secret
postgres:
secretName: matrix-authentication-service-secret
initContainers:
dbInit:
image:
repository: ghcr.io/onedr0p/postgres-init
tag: "16"
envFrom:
- secretRef:
name: matrix-authentication-service-secret
image:
registry: ghcr.io
repository: matrix-org/matrix-authentication-service