{{/* Make sure all variables are set properly */}}
{{- include "tc.v1.common.loader.init" . }}

{{/* Render configmap for frigate */}}
{{- $config := include "frigate.configmap" . | fromYaml -}}
{{- if $config -}}
  {{- $_ := set .Values.configmap "frigate-config" $config -}}
{{- end -}}


{{- $vol := include "frigate.configVolume" . | fromYaml -}}
{{- if $vol -}}
  {{- $_ := set .Values.persistence "frigate-config" $vol -}}
{{- end -}}

{{/* Render the templates */}}
{{ include "tc.v1.common.loader.apply" . }}
