mirror of
https://github.com/truenas/charts.git
synced 2026-04-27 03:52:04 +08:00
* init commit * add deployments * more config * syntax err * syntax err * add missing func * naming * lint * fix yaml * yaml * ci vals * ci port * perms * wrong pod * hmm * meh * no nginx without cert * db stuf * simplify * add nots * fixes * add todo * storage * test https * perms * actually mount the config * add some configs * update values * fsgroup * cmaps * update config * init quests * more test vals * more questions * nginx conf * cron * fix cron * meta * typo * additional storage goes to cron too * data and html * config * ui * values * fix * add backwards compat * make templ * use var * init migration * make exec * add todo * handle hostpaths too * update storage for backwards * typo * add redis * cleaner storage solution * br * rm * some cleanup * backup * whops * fsgroup * fix db script * bump image * remove test * test * todo * try this * lets try a hack * hmm * nope * eof * ofc * hmm * fix * explain the hack * update vers * remove todo * fix html storage * backwards compat
39 lines
2.2 KiB
YAML
39 lines
2.2 KiB
YAML
{{- include "ix.v1.common.loader.init" . -}}
|
|
|
|
{{- include "nextcloud.migration" $ -}}
|
|
|
|
{{/* Merge the templates with Values */}}
|
|
{{- $_ := mustMergeOverwrite .Values (include "nextcloud.workload" $ | fromYaml) -}}
|
|
{{- $_ := mustMergeOverwrite .Values (include "nextcloud.configuration" $ | fromYaml) -}}
|
|
{{- $_ := mustMergeOverwrite .Values (include "nextcloud.configs" $ | fromYaml) -}}
|
|
{{- if .Values.ncNetwork.certificateID }}
|
|
{{- $_ := mustMergeOverwrite .Values (include "nginx.workload" $ | fromYaml) -}}
|
|
{{- end }}
|
|
{{- if .Values.ncConfig.cron.enabled }}
|
|
{{- $_ := mustMergeOverwrite .Values (include "nextcloud.cron" $ | fromYaml) -}}
|
|
{{- end }}
|
|
{{- $_ := mustMergeOverwrite .Values (include "nginx.configuration" $ | fromYaml) -}}
|
|
{{- $_ := mustMergeOverwrite .Values (include "postgres.workload" $ | fromYaml) -}}
|
|
{{- $_ := mustMergeOverwrite .Values (include "redis.workload" $ | fromYaml) -}}
|
|
{{- $_ := mustMergeOverwrite .Values (include "nextcloud.service" $ | fromYaml) -}}
|
|
{{- $_ := mustMergeOverwrite .Values (include "nextcloud.persistence" $ | fromYaml) -}}
|
|
|
|
{{/* Mutate postgres backup command to handle nextcloud config */}}
|
|
{{- $cmd := .Values.workload.postgresbackup.podSpec.containers.postgresbackup.command -}}
|
|
{{- $temp := printf ("%s\n%s\n%s\n%s\n%s\n%s\n%s")
|
|
"echo 'Fetching password from config.php'"
|
|
"# sed removes ' , => spaces and db* from the string"
|
|
"POSTGRES_USER=$(cat /nc-config/config/config.php | grep 'dbuser' | sed \"s/dbuser\\| \\|'\\|,\\|=>//g\")"
|
|
"POSTGRES_PASSWORD=$(cat /nc-config/config/config.php | grep 'dbpassword' | sed \"s/dbpassword\\| \\|'\\|,\\|=>//g\")"
|
|
"POSTGRES_DB=$(cat /nc-config/config/config.php | grep 'dbname' | sed \"s/dbname\\| \\|'\\|,\\|=>//g\")"
|
|
"[ -n \"$POSTGRES_USER\" ] && [ -n \"$POSTGRES_PASSWORD\" ] && [ -n \"$POSTGRES_DB\" ] && echo 'User, Database and password fetched from config.php'"
|
|
(index $cmd 2) -}}
|
|
{{- $newCmd := (list (index $cmd 0) (index $cmd 1) $temp) -}}
|
|
{{- $_ := set .Values.workload.postgresbackup.podSpec.containers.postgresbackup "command" $newCmd -}}
|
|
{{- $_ := set .Values.workload.postgresbackup.podSpec "securityContext" (dict "fsGroup" "33") -}}
|
|
|
|
{{/* Create the configmap for portal manually*/}}
|
|
{{- include "nextcloud.portal" $ -}}
|
|
|
|
{{- include "ix.v1.common.loader.apply" . -}}
|