mirror of
https://github.com/truenas/charts.git
synced 2026-04-27 20:13:21 +08:00
* add `joplin` to `community` apps * add storage and service * add more boilerplat * add some test values * add values * update readme * add basic ui * add initialmeta * add todo * render config * use 1001 * fix probes * reduce permissiosn * fix portal * remove todo * bump common * simplify probe header * add deafult creds * remove redundant values * update wording
30 lines
987 B
Smarty
30 lines
987 B
Smarty
{{- define "joplin.configuration" -}}
|
|
{{- $fullname := (include "ix.v1.common.lib.chart.names.fullname" $) -}}
|
|
|
|
{{- $dbHost := (printf "%s-postgres" $fullname) -}}
|
|
{{- $dbUser := "joplin" -}}
|
|
{{- $dbName := "joplin" -}}
|
|
|
|
{{- $dbPass := randAlphaNum 32 -}}
|
|
{{- with (lookup "v1" "Secret" .Release.Namespace (printf "%s-postgres-creds" $fullname)) -}}
|
|
{{- $dbPass = ((index .data "POSTGRES_PASSWORD") | b64dec) -}}
|
|
{{- end -}}
|
|
|
|
{{/* Temporary set dynamic db details on values,
|
|
so we can print them on the notes */}}
|
|
{{- $_ := set .Values "joplinDbPass" $dbPass -}}
|
|
{{- $_ := set .Values "joplinDbHost" $dbHost -}}
|
|
|
|
{{- $dbURL := (printf "postgres://%s:%s@%s:5432/%s?sslmode=disable" $dbUser $dbPass $dbHost $dbName) }}
|
|
|
|
secret:
|
|
postgres-creds:
|
|
enabled: true
|
|
data:
|
|
POSTGRES_USER: {{ $dbUser }}
|
|
POSTGRES_DB: {{ $dbName }}
|
|
POSTGRES_PASSWORD: {{ $dbPass }}
|
|
POSTGRES_HOST: {{ $dbHost }}
|
|
POSTGRES_URL: {{ $dbURL }}
|
|
{{- end -}}
|