Skip to content

Commit

Permalink
refactor helm-dashboard.fullname template (#562)
Browse files Browse the repository at this point in the history
fix ci

Co-authored-by: Aleksandr Cupacenko <alcu@danskebank.lt>
  • Loading branch information
unitmatrix and Aleksandr Cupacenko authored Nov 25, 2024
1 parent 922bb1c commit 3b0b44f
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions charts/helm-dashboard/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

{{/*
Expand Down

0 comments on commit 3b0b44f

Please sign in to comment.