Skip to content

Commit 3b0b44f

Browse files
unitmatrixAleksandr Cupacenko
andauthored
refactor helm-dashboard.fullname template (#562)
fix ci Co-authored-by: Aleksandr Cupacenko <[email protected]>
1 parent 922bb1c commit 3b0b44f

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

charts/helm-dashboard/templates/_helpers.tpl

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,9 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
1111
If release name contains chart name it will be used as a full name.
1212
*/}}
1313
{{- define "helm-dashboard.fullname" -}}
14-
{{- if .Values.fullnameOverride }}
15-
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16-
{{- else }}
1714
{{- $name := default .Chart.Name .Values.nameOverride }}
18-
{{- if contains $name .Release.Name }}
19-
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20-
{{- else }}
21-
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22-
{{- end }}
23-
{{- end }}
15+
{{- $fullname := default (ternary .Release.Name (printf "%s-%s" .Release.Name $name) (contains $name .Release.Name)) .Values.fullnameOverride }}
16+
{{- $fullname | trunc 63 | trimSuffix "-" }}
2417
{{- end }}
2518

2619
{{/*

0 commit comments

Comments
 (0)