feat(flatnotes): add flatnotes (#3804)

* feat(flatnotes): add flatnotes

* rofs false

* Update charts/incubator/flatnotes/values.yaml

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* root

* user 1000

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
This commit is contained in:
Stavros Kois
2022-09-18 20:37:03 +03:00
committed by GitHub
parent c60bbda5ab
commit 787d0bc567
9 changed files with 271 additions and 0 deletions
@@ -0,0 +1,19 @@
{{/* Define the secrets */}}
{{- define "flatnotes.secrets" -}}
{{- $secretName := printf "%s-secret" (include "tc.common.names.fullname" .) }}
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: {{ $secretName }}
data:
{{- with (lookup "v1" "Secret" .Release.Namespace $secretName) }}
FLATNOTES_SECRET_KEY: {{ index .data "FLATNOTES_SECRET_KEY" }}
{{- else }}
FLATNOTES_SECRET_KEY: {{ randAlphaNum 32 | b64enc }}
{{- end }}
{{- end -}}
@@ -0,0 +1,8 @@
{{/* Make sure all variables are set properly */}}
{{- include "tc.common.loader.init" . }}
{{/* Render secrets for flatnotes */}}
{{- include "flatnotes.secrets" . }}
{{/* Render the templates */}}
{{ include "tc.common.loader.apply" . }}