{{- include "ix.v1.common.loader.init" . -}}

{{- include "n8n.validation" $ -}}

{{/* Merge the templates with Values */}}
{{- $_ := mustMergeOverwrite .Values (include "n8n.configuration" $ | fromYaml) -}}
{{- $_ := mustMergeOverwrite .Values (include "n8n.service" $ | fromYaml) -}}
{{- $_ := mustMergeOverwrite .Values (include "n8n.persistence" $ | fromYaml) -}}
{{- $_ := mustMergeOverwrite .Values (include "n8n.workload" $ | fromYaml) -}}
{{- $_ := mustMergeOverwrite .Values (include "postgres.workload" $ | fromYaml) -}}
{{- $_ := mustMergeOverwrite .Values (include "redis.workload" $ | fromYaml) -}}

{{/* Create the configmap for portal manually*/}}
{{- include "n8n.portal" $ -}}

{{- include "ix.v1.common.loader.apply" . -}}
