From 3b0b44f392b3c67bcb6b14eda07b944646cc7f14 Mon Sep 17 00:00:00 2001 From: Aleksandr Cupacenko Date: Mon, 25 Nov 2024 12:46:36 +0200 Subject: [PATCH] refactor helm-dashboard.fullname template (#562) fix ci Co-authored-by: Aleksandr Cupacenko --- charts/helm-dashboard/templates/_helpers.tpl | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/charts/helm-dashboard/templates/_helpers.tpl b/charts/helm-dashboard/templates/_helpers.tpl index 2fef9482..5e2ced80 100644 --- a/charts/helm-dashboard/templates/_helpers.tpl +++ b/charts/helm-dashboard/templates/_helpers.tpl @@ -11,16 +11,9 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this 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 "-" }} -{{- 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 }} -{{- end }} +{{- $fullname := default (ternary .Release.Name (printf "%s-%s" .Release.Name $name) (contains $name .Release.Name)) .Values.fullnameOverride }} +{{- $fullname | trunc 63 | trimSuffix "-" }} {{- end }} {{/*