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

{{/* Merge the templates with Values */}}
{{- $_ := mustMergeOverwrite .Values (include "firefly.configuration" $ | fromYaml) -}}
{{- $_ := mustMergeOverwrite .Values (include "firefly.service" $ | fromYaml) -}}
{{- $_ := mustMergeOverwrite .Values (include "firefly.persistence" $ | fromYaml) -}}
{{- $_ := mustMergeOverwrite .Values (include "firefly.workload" $ | fromYaml) -}}
{{- $_ := mustMergeOverwrite .Values (include "firefly.cron" $ | fromYaml) -}}
{{- if .Values.fireflyConfig.enableImporter -}}
  {{- $_ := mustMergeOverwrite .Values (include "firefly.importer" $ | fromYaml) -}}
{{- end -}}
{{- $_ := mustMergeOverwrite .Values (include "postgres.workload" $ | fromYaml) -}}
{{- $_ := mustMergeOverwrite .Values (include "redis.workload" $ | fromYaml) -}}

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

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