Fix authelia db issues

This commit is contained in:
kjeld Schouten-Lebbing
2021-08-31 20:40:39 +02:00
parent 7a57d0c853
commit 832698a136
3 changed files with 8 additions and 7 deletions

View File

@@ -38,4 +38,4 @@ sources:
- https://github.com/authelia/chartrepo
- https://github.com/authelia/authelia
type: application
version: 1.6.1
version: 1.6.2

View File

@@ -7,13 +7,14 @@ kind: Secret
metadata:
labels:
{{- include "common.labels" . | nindent 4 }}
name: {{ .Release.Name }}-dbcreds
{{- $dbprevious := lookup "v1" "Secret" .Release.Namespace ( ( printf "%v-%v" .Release.Name "dbcreds" ) | quote ) }}
name: dbcreds
{{- $previous := lookup "v1" "Secret" .Release.Namespace "dbcreds" }}
{{- $dbPass := "" }}
data:
{{- if $dbprevious }}
postgresql-password: {{ ( index $dbprevious.data "postgresql-password" ) }}
postgresql-postgres-password: {{ ( index $dbprevious.data "postgresql-postgres-password" ) }}
{{- if $previous }}
{{- $dbPass = ( index $previous.data "postgresql-password" ) | b64dec }}
postgresql-password: {{ ( index $previous.data "postgresql-password" ) }}
postgresql-postgres-password: {{ ( index $previous.data "postgresql-postgres-password" ) }}
{{- else }}
{{- $dbPass = randAlphaNum 50 }}
postgresql-password: {{ $dbPass | b64enc | quote }}

View File

@@ -37,7 +37,7 @@ postgresql:
enabled: true
postgresqlUsername: authelia
postgresqlDatabase: authelia
existingSecret: "{{ .Release.Name }}-dbcreds"
existingSecret: dbcreds
# Enabled redis
# ... for more options see https://github.com/bitnami/charts/tree/master/bitnami/redis