Verified Commit 823a607e authored by Hugo's avatar Hugo
Browse files

add secret

parent 82d0a17a
{{ $name := print (include "fqdn" .) "-app" }}
apiVersion: v1
kind: Secret
metadata:
name: {{ $name }}
type: Opaque
stringData:
{{ $secretName := print "hedgedoc.pg-" .Release.Namespace ".credentials" }}
{{ $secret := lookup "v1" "Secret" .Release.Namespace $secretName }}
{{ required (print $secretName " not found") $secret.username }}
CMD_DB_URL: postgres://{{ $secret.data.username }}:{{ $secret.data.password }}@pg-{{ .Release.Namespace }}:5432/hedgedoc
{{- if .Release.IsInstall }}
CMD_SESSION_SECRET: {{ randAlphaNum 16 }}
{{ else }}
CMD_SESSION_SECRET: {{ (lookup "v1" "Secret" .Release.Namespace $name).data.CMD_SESSION_SECRET }}
{{ end }}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment