fix(outline): fix secret (#2405)
* test * no 64enc * stringData * data * length * hmm * whoops * bump
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 -}}
|
||||
|
||||
Reference in New Issue
Block a user