Files
chart/library/ix-dev/community/unifi-protect-backup/templates/_validation.tpl
Stavros Kois 1cac3606c0 NAS-123909 / 24.04 / Add unifi-protect-backup to community train (#1508)
* initial commit

* add templates and ui

* typo

* typo

* update metadata

* fix types

* add uid for files

* update metadata

* bump common
2023-09-06 15:37:27 +03:00

11 lines
387 B
Smarty

{{- define "upb.validation" -}}
{{- $validTypes := (list "motion" "person" "vehicle" "ring") -}}
{{- range $type := .Values.upbConfig.detectionTypes -}}
{{- if not (mustHas $type $validTypes) -}}
{{- fail (printf "Unifi Protect Backup - Expected Detection type to be one of [%s], but got [%s]" (join ", " $validTypes) $type) -}}
{{- end -}}
{{- end -}}
{{- end -}}