TrueChartsClone/charts/stable/vaultwarden/templates/_validate.tpl

18 lines
714 B
Smarty
Raw Normal View History

2021-04-13 15:02:41 +00:00
{{/*
Ensure valid DB type is select, defaults to SQLite
*/}}
{{- define "vaultwarden.dbTypeValid" -}}
2021-04-13 15:02:41 +00:00
{{- if not (or (eq .Values.database.type "postgresql") (eq .Values.database.type "mysql") (eq .Values.database.type "sqlite")) }}
{{- required "Invalid database type" nil }}
{{- end -}}
{{- end -}}
{{/*
Ensure log type is valid
*/}}
{{- define "vaultwarden.logLevelValid" -}}
{{- if not (or (eq .Values.vaultwarden.log.level "trace") (eq .Values.vaultwarden.log.level "debug") (eq .Values.vaultwarden.log.level "info") (eq .Values.vaultwarden.log.level "warn") (eq .Values.vaultwarden.log.level "error") (eq .Values.vaultwarden.log.level "off")) }}
2021-04-13 15:02:41 +00:00
{{- required "Invalid log level" nil }}
{{- end }}
{{- end }}