From f27616d268ae84a81bdcb6ae4d130861f60e6282 Mon Sep 17 00:00:00 2001 From: Aleksandr Cupacenko Date: Mon, 25 Nov 2024 10:44:59 +0200 Subject: [PATCH] refactor helm-dashboard.fullname template fix ci --- 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 }} {{/*