feat(matrix-authentication-service): add postgres init
This commit is contained in:
parent
831a384491
commit
b9364370ab
2 changed files with 32 additions and 0 deletions
20
charts/matrix-authentication-service/templates/db-init.yaml
Normal file
20
charts/matrix-authentication-service/templates/db-init.yaml
Normal 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
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue