fix(authelia): correct upgrade handling without encryption key

This commit is contained in:
kjeld Schouten-Lebbing 2021-12-06 00:57:57 +01:00
parent bd8dc244fa
commit 34e8545969
No known key found for this signature in database
GPG Key ID: 4CDAD4A532BC1EDB
2 changed files with 7 additions and 2 deletions

View File

@ -38,7 +38,7 @@ sources:
- https://github.com/authelia/chartrepo
- https://github.com/authelia/authelia
type: application
version: 8.0.12
version: 8.0.13
annotations:
truecharts.org/catagories: |
- security

View File

@ -15,9 +15,14 @@ metadata:
{{- $encryptionkey := "" }}
data:
{{- if $autheliaprevious }}
ENCRYPTION_KEY: {{ index $autheliaprevious.data "ENCRYPTION_KEY" }}
SESSION_ENCRYPTION_KEY: {{ index $autheliaprevious.data "SESSION_ENCRYPTION_KEY" }}
JWT_TOKEN: {{ index $autheliaprevious.data "JWT_TOKEN" }}
{{- if ( hasKey $autheliaprevious.data "ENCRYPTION_KEY" ) }}
ENCRYPTION_KEY: {{ index $autheliaprevious.data "ENCRYPTION_KEY" }}
{{- else }}
{{- $encryptionkey := randAlphaNum 100 }}
ENCRYPTION_KEY: {{ $encryptionkey | b64enc | quote }}
{{- end }}
{{- else }}
{{- $jwtsecret := randAlphaNum 50 }}
{{- $sessionsecret := randAlphaNum 50 }}