diff --git a/charts/helm-dashboard/templates/_helpers.tpl b/charts/helm-dashboard/templates/_helpers.tpl index 2fef9482..86ffd4be 100644 --- a/charts/helm-dashboard/templates/_helpers.tpl +++ b/charts/helm-dashboard/templates/_helpers.tpl @@ -12,15 +12,16 @@ If release name contains chart name it will be used as a full name. */}} {{- define "helm-dashboard.fullname" -}} {{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} + {{- $fullname := .Values.fullnameOverride }} {{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} + {{- $name := default .Chart.Name .Values.nameOverride }} + {{- if contains $name .Release.Name }} + {{- $fullname := .Release.Name }} + {{- else }} + {{- $fullname := printf "%s-%s" .Release.Name $name }} + {{- end }} {{- end }} +{{- $fullname | trunc 63 | trimSuffix "-" }} {{- end }} {{/*