wait for postgresql to start before starting authelia

This commit is contained in:
kjeld Schouten-Lebbing
2021-09-01 17:42:27 +02:00
parent 03dbc94b1f
commit 83342af6ae
3 changed files with 17 additions and 1 deletions
+1 -1
View File
@@ -38,4 +38,4 @@ sources:
- https://github.com/authelia/chartrepo
- https://github.com/authelia/authelia
type: application
version: 1.6.13
version: 1.6.14
@@ -21,6 +21,7 @@ data:
postgresql-postgres-password: {{ randAlphaNum 50 | b64enc | quote }}
{{- end }}
url: {{ ( printf "%v%v:%v@%v-%v:%v/%v" "postgresql://" .Values.postgresql.postgresqlUsername $dbPass .Release.Name "postgresql" "5432" .Values.postgresql.postgresqlDatabase ) | b64enc | quote }}
plainhost: {{ ( printf "%v-%v" .Release.Name "postgresql" ) | b64enc | quote }}
type: Opaque
+15
View File
@@ -19,6 +19,21 @@ service:
main:
port: 9091
initContainers:
- name: init-postgresdb
image: postgres:13.1
command:
- "sh"
- "-c"
- "until pg_isready -U authelia -h ${pghost} ; do sleep 2 ; done"
imagePullPolicy: IfNotPresent
env:
- name: pghost
valueFrom:
secretKeyRef:
name: dbcreds
key: plainhost
persistence:
config:
enabled: true