2022-03-22 19:21:25 +00:00
|
|
|
{{/* Define the secrets */}}
|
|
|
|
{{- define "outline.secrets" -}}
|
2023-04-11 10:07:17 +00:00
|
|
|
{{- $secretName := (printf "%s-outline-secrets" (include "tc.v1.common.lib.chart.names.fullname" $)) }}
|
2023-05-01 15:29:23 +00:00
|
|
|
|
|
|
|
{{/* Outline wants a HEX 32 char string */}}
|
|
|
|
{{- $secret_key := (printf "%x" (randAlphaNum 32)) }}
|
|
|
|
{{- $utils_secret := (printf "%x" (randAlphaNum 32)) }}
|
|
|
|
{{- with (lookup "v1" "Secret" .Release.Namespace $secretName) }}
|
|
|
|
{{- $secret_key = index .data "SECRET_KEY" | b64dec }}
|
|
|
|
{{- $utils_secret = index .data "UTILS_SECRET" | b64dec }}
|
|
|
|
{{- end }}
|
2023-04-11 10:07:17 +00:00
|
|
|
enabled: true
|
2022-04-03 12:44:14 +00:00
|
|
|
data:
|
2023-05-01 15:29:23 +00:00
|
|
|
SECRET_KEY: {{ $secret_key }}
|
|
|
|
UTILS_SECRET: {{ $utils_secret }}
|
|
|
|
REDIS_CUSTOM_URL: {{ .Values.redis.creds.url | trimAll "\"" }}
|
2022-03-22 19:21:25 +00:00
|
|
|
{{- end -}}
|