_validation.tpl 387 B

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