From 9e21abbddfa8fda581c8d316bf5beda8baae5fe8 Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Sun, 3 Apr 2022 15:44:14 +0300 Subject: [PATCH] fix(outline): fix secret (#2405) * test * no 64enc * stringData * data * length * hmm * whoops * bump --- charts/stable/outline/Chart.yaml | 2 +- charts/stable/outline/templates/_secrets.tpl | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/charts/stable/outline/Chart.yaml b/charts/stable/outline/Chart.yaml index 8178d8232df..17fbc4cde2d 100644 --- a/charts/stable/outline/Chart.yaml +++ b/charts/stable/outline/Chart.yaml @@ -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 diff --git a/charts/stable/outline/templates/_secrets.tpl b/charts/stable/outline/templates/_secrets.tpl index 1b95c7a33ca..1efc2ed0576 100644 --- a/charts/stable/outline/templates/_secrets.tpl +++ b/charts/stable/outline/templates/_secrets.tpl @@ -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 -}}