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:
|
sources:
|
||||||
- https://github.com/outline/outline
|
- https://github.com/outline/outline
|
||||||
type: application
|
type: application
|
||||||
version: 1.0.12
|
version: 1.0.13
|
||||||
annotations:
|
annotations:
|
||||||
truecharts.org/catagories: |
|
truecharts.org/catagories: |
|
||||||
- productivity
|
- productivity
|
||||||
|
|||||||
@@ -10,16 +10,16 @@ metadata:
|
|||||||
{{- $outlineprevious := lookup "v1" "Secret" .Release.Namespace "outline-secrets" }}
|
{{- $outlineprevious := lookup "v1" "Secret" .Release.Namespace "outline-secrets" }}
|
||||||
{{- $secret_key := "" }}
|
{{- $secret_key := "" }}
|
||||||
{{- $utils_secret := "" }}
|
{{- $utils_secret := "" }}
|
||||||
stringData:
|
data:
|
||||||
{{- if $outlineprevious}}
|
{{- if $outlineprevious}}
|
||||||
SECRET_KEY: {{ index $outlineprevious.data "SECRET_KEY" }}
|
SECRET_KEY: {{ index $outlineprevious.data "SECRET_KEY" }}
|
||||||
UTILS_SECRET: {{ index $outlineprevious.data "UTILS_SECRET" }}
|
UTILS_SECRET: {{ index $outlineprevious.data "UTILS_SECRET" }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- $secret_key := randAlphaNum 64 }}
|
{{- $secret_key := randAlphaNum 32 }}
|
||||||
{{- $utils_secret := randAlphaNum 64 }}
|
{{- $utils_secret := randAlphaNum 32 }}
|
||||||
{{/* Outline does the b64enc itself, so we pass them clear */}}
|
{{/* Outline wants a HEX 32 char string */}}
|
||||||
SECRET_KEY: {{ $secret_key }}
|
SECRET_KEY: {{ (printf "%x" $secret_key) | b64enc }}
|
||||||
UTILS_SECRET: {{ $utils_secret }}
|
UTILS_SECRET: {{ (printf "%x" $utils_secret) | b64enc }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|||||||
Reference in New Issue
Block a user