fix(outline): fix secret (#2405)

* test

* no 64enc

* stringData

* data

* length

* hmm

* whoops

* bump
This commit is contained in:
Stavros Kois
2022-04-03 15:44:14 +03:00
committed by GitHub
parent 206c8cdc25
commit 9e21abbddf
2 changed files with 7 additions and 7 deletions

View File

@@ -28,7 +28,7 @@ name: outline
sources:
- https://github.com/outline/outline
type: application
version: 1.0.12
version: 1.0.13
annotations:
truecharts.org/catagories: |
- productivity

View File

@@ -10,16 +10,16 @@ metadata:
{{- $outlineprevious := lookup "v1" "Secret" .Release.Namespace "outline-secrets" }}
{{- $secret_key := "" }}
{{- $utils_secret := "" }}
stringData:
data:
{{- if $outlineprevious}}
SECRET_KEY: {{ index $outlineprevious.data "SECRET_KEY" }}
UTILS_SECRET: {{ index $outlineprevious.data "UTILS_SECRET" }}
{{- else }}
{{- $secret_key := randAlphaNum 64 }}
{{- $utils_secret := randAlphaNum 64 }}
{{/* Outline does the b64enc itself, so we pass them clear */}}
SECRET_KEY: {{ $secret_key }}
UTILS_SECRET: {{ $utils_secret }}
{{- $secret_key := randAlphaNum 32 }}
{{- $utils_secret := randAlphaNum 32 }}
{{/* Outline wants a HEX 32 char string */}}
SECRET_KEY: {{ (printf "%x" $secret_key) | b64enc }}
UTILS_SECRET: {{ (printf "%x" $utils_secret) | b64enc }}
{{- end }}
{{- end -}}