69 lines
2.8 KiB
YAML
69 lines
2.8 KiB
YAML
{{/* Make sure all variables are set properly */}}
|
|
{{- include "tc.v1.common.loader.init" . -}}
|
|
|
|
{{- include "nextcloud.validation" $ -}}
|
|
|
|
{{/* Render configmaps for all pods */}}
|
|
{{- $configmaps := include "nextcloud.configmaps" . | fromYaml -}}
|
|
{{- if $configmaps -}}
|
|
{{- $_ := mustMergeOverwrite .Values.configmap $configmaps -}}
|
|
{{- end -}}
|
|
|
|
{{/* Add [init perms] container to nextcloud */}}
|
|
{{- if not (get .Values.workload.main.podSpec "initContainers") -}}
|
|
{{- $_ := set .Values.workload.main.podSpec "initContainers" dict -}}
|
|
{{- end -}}
|
|
|
|
{{- $initPerms := (include "nextcloud.init.perms" . | fromYaml) -}}
|
|
{{- $_ := set .Values.workload.main.podSpec.initContainers "init-perms" $initPerms -}}
|
|
|
|
{{/* Add [wait nextcloud] container to nginx */}}
|
|
{{- if not (get .Values.workload.nginx.podSpec "initContainers") -}}
|
|
{{- $_ := set .Values.workload.nginx.podSpec "initContainers" dict -}}
|
|
{{- end -}}
|
|
{{- $waitNextcloud := (include "nextcloud.wait.nextcloud" . | fromYaml) -}}
|
|
{{- $_ := set .Values.workload.nginx.podSpec.initContainers "wait-nextcloud" $waitNextcloud -}}
|
|
|
|
{{/* Disable [notify push] if requested */}}
|
|
{{- if not .Values.nextcloud.notify_push.enabled -}}
|
|
{{- $_ := set .Values.workload.notify "enabled" false -}}
|
|
{{- $_ := set .Values.service.notify "enabled" false -}}
|
|
{{- else -}}
|
|
{{/* Add [wait nextcloud] container to notify push */}}
|
|
{{- if not (get .Values.workload.notify.podSpec "initContainers") -}}
|
|
{{- $_ := set .Values.workload.notify.podSpec "initContainers" dict -}}
|
|
{{- end -}}
|
|
{{- $waitNextcloud := (include "nextcloud.wait.nextcloud" . | fromYaml) -}}
|
|
{{- $_ := set .Values.workload.notify.podSpec.initContainers "wait-nextcloud" $waitNextcloud -}}
|
|
{{- end -}}
|
|
|
|
{{/* Disable [clamav] if requested */}}
|
|
{{- if not .Values.nextcloud.clamav.enabled -}}
|
|
{{- $_ := set .Values.workload.clamav "enabled" false -}}
|
|
{{- $_ := set .Values.service.clamav "enabled" false -}}
|
|
{{- end -}}
|
|
|
|
{{/* Disable [previews] if requested */}}
|
|
{{- if or (not .Values.nextcloud.previews.imaginary) (not .Values.nextcloud.previews.enabled) -}}
|
|
{{- $_ := set .Values.workload.imaginary "enabled" false -}}
|
|
{{- $_ := set .Values.service.imaginary "enabled" false -}}
|
|
{{- end -}}
|
|
|
|
{{/* Disable [collabora] if requested */}}
|
|
{{- if not .Values.nextcloud.collabora.enabled -}}
|
|
{{- $_ := set .Values.workload.collabora "enabled" false -}}
|
|
{{- $_ := set .Values.service.collabora "enabled" false -}}
|
|
{{- end -}}
|
|
|
|
{{/* Create [cronjobs] defined */}}
|
|
{{- $cronjobs := include "nextcloud.cronjobs" . | fromYaml -}}
|
|
{{- if $cronjobs -}}
|
|
{{- $_ := mustMergeOverwrite .Values.workload $cronjobs -}}
|
|
{{- end -}}
|
|
|
|
{{/* TODO: Do we have to cleanup when something (eg Collabora) is disabled? */}}
|
|
{{- include "nextcloud.ingressInjector" $ -}}
|
|
|
|
{{/* Render the templates */}}
|
|
{{- include "tc.v1.common.loader.apply" . -}}
|