diff --git a/charts/incubator/authelia/Chart.yaml b/charts/incubator/authelia/Chart.yaml index bb47eb1ca48..dca31ac37b3 100644 --- a/charts/incubator/authelia/Chart.yaml +++ b/charts/incubator/authelia/Chart.yaml @@ -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 diff --git a/charts/incubator/authelia/templates/_secrets.tpl b/charts/incubator/authelia/templates/_secrets.tpl index 44f8b0e1548..b1f69810d2a 100644 --- a/charts/incubator/authelia/templates/_secrets.tpl +++ b/charts/incubator/authelia/templates/_secrets.tpl @@ -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 }} diff --git a/charts/incubator/authelia/values.yaml b/charts/incubator/authelia/values.yaml index f416a33a438..3a418e333d1 100644 --- a/charts/incubator/authelia/values.yaml +++ b/charts/incubator/authelia/values.yaml @@ -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