Skip to content

Commit

Permalink
refactor helm-dashboard.fullname template
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksandr Cupacenko committed Nov 25, 2024
1 parent 922bb1c commit 6ddb863
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions charts/helm-dashboard/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

{{/*
Expand Down

0 comments on commit 6ddb863

Please sign in to comment.