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
+1 -1
View File
@@ -38,4 +38,4 @@ sources:
- https://github.com/authelia/chartrepo - https://github.com/authelia/chartrepo
- https://github.com/authelia/authelia - https://github.com/authelia/authelia
type: application type: application
version: 1.6.1 version: 1.6.2
@@ -7,13 +7,14 @@ kind: Secret
metadata: metadata:
labels: labels:
{{- include "common.labels" . | nindent 4 }} {{- include "common.labels" . | nindent 4 }}
name: {{ .Release.Name }}-dbcreds name: dbcreds
{{- $dbprevious := lookup "v1" "Secret" .Release.Namespace ( ( printf "%v-%v" .Release.Name "dbcreds" ) | quote ) }} {{- $previous := lookup "v1" "Secret" .Release.Namespace "dbcreds" }}
{{- $dbPass := "" }} {{- $dbPass := "" }}
data: data:
{{- if $dbprevious }} {{- if $previous }}
postgresql-password: {{ ( index $dbprevious.data "postgresql-password" ) }} {{- $dbPass = ( index $previous.data "postgresql-password" ) | b64dec }}
postgresql-postgres-password: {{ ( index $dbprevious.data "postgresql-postgres-password" ) }} postgresql-password: {{ ( index $previous.data "postgresql-password" ) }}
postgresql-postgres-password: {{ ( index $previous.data "postgresql-postgres-password" ) }}
{{- else }} {{- else }}
{{- $dbPass = randAlphaNum 50 }} {{- $dbPass = randAlphaNum 50 }}
postgresql-password: {{ $dbPass | b64enc | quote }} postgresql-password: {{ $dbPass | b64enc | quote }}
+1 -1
View File
@@ -37,7 +37,7 @@ postgresql:
enabled: true enabled: true
postgresqlUsername: authelia postgresqlUsername: authelia
postgresqlDatabase: authelia postgresqlDatabase: authelia
existingSecret: "{{ .Release.Name }}-dbcreds" existingSecret: dbcreds
# Enabled redis # Enabled redis
# ... for more options see https://github.com/bitnami/charts/tree/master/bitnami/redis # ... for more options see https://github.com/bitnami/charts/tree/master/bitnami/redis