Files
truecharts/charts/stable/snipe-it/templates/_secrets.tpl
T
Stavros KoisandGitHub 340d22d0be feat(snipe-it): Use official image (#2257)
* feat(snipe-it): Use official image

* lint

* lint

* try rootless

* add questions

* rofs

* more questions

* add upgrade contaienr

* set to init for test

* cleanup
2022-03-23 21:10:15 +02:00

21 lines
450 B
Smarty

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