Files
truecharts/charts/incubator/authentik/templates/_secrets.tpl
T
Stavros KoisandGitHub c843864fa5 feat(authentik): add authentik (#2535)
* feat(authentik): add authentik

* add secret

* try something crazy

* run geoip as a cronjob

* test

* whoops

* add gui options

* pin image

* add secret togui

* try http as main

* whops

* clear up

* clean
2022-04-22 21:44:57 +00:00

21 lines
510 B
Smarty

{{/* Define the secrets */}}
{{- define "authentik.secrets" -}}
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: authentik-secrets
{{- $authentikprevious := lookup "v1" "Secret" .Release.Namespace "authentik-secrets" }}
{{- $secret_key := "" }}
data:
{{- if $authentikprevious}}
AUTHENTIK_SECRET_KEY: {{ index $authentikprevious.data "AUTHENTIK_SECRET_KEY" }}
{{- else }}
{{- $secret_key := randAlphaNum 32 }}
AUTHENTIK_SECRET_KEY: {{ $secret_key | b64enc }}
{{- end }}
{{- end -}}