mirror of
https://gitlab.com/oecis/charts.git
synced 2024-11-19 13:19:03 +00:00
32 lines
900 B
Smarty
32 lines
900 B
Smarty
{{/*
|
|
Return a default application name.
|
|
*/}}
|
|
{{- define "vaultwarden.fullname" -}}
|
|
{{- if .Values.fullnameOverride -}}
|
|
{{- .Values.fullnameOverride | trunc 20 | trimSuffix "-" -}}
|
|
{{- else -}}
|
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
|
{{- if contains $name .Release.Name -}}
|
|
{{- .Release.Name | trunc 20 | trimSuffix "-" -}}
|
|
{{- else -}}
|
|
{{- printf "%s-%s" .Release.Name $name | trunc 20 | trimSuffix "-" -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{- define "dbPort" -}}
|
|
{{- if .Values.database.port }}
|
|
{{- printf "%s%s" ":" .Values.database.port }}
|
|
{{- else }}
|
|
{{- printf "%s" "" }}
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
{{/*
|
|
Return the database string
|
|
*/}}
|
|
{{ define "dbString" }}
|
|
{{- $var := print .Values.database.type "://" .Values.database.username ":" .Values.database.password "@" .Values.database.host (include "dbPort" . ) "/" .Values.database.dbName }}
|
|
{{- printf "%s" $var }}
|
|
{{- end -}}
|