2021-04-13 15:02:41 +00:00
|
|
|
{{/*
|
|
|
|
Ensure valid DB type is select, defaults to SQLite
|
|
|
|
*/}}
|
2021-05-22 22:18:56 +00:00
|
|
|
{{- 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
|
|
|
|
*/}}
|
2021-05-22 22:18:56 +00:00
|
|
|
{{- 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 }}
|