X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fcommon%2Fcommon%2Ftemplates%2F_name.tpl;h=7719cdbb9f90e4da03313cd66bd156203c929151;hb=d622ece51e323fe4586a85d81bf014bfa61bca40;hp=9b7e69046af61fbb3b774c35b11c1aa7ea24073f;hpb=1155349e7b7dafc81ad94a5e48423e8aaf6fb7f2;p=oom.git diff --git a/kubernetes/common/common/templates/_name.tpl b/kubernetes/common/common/templates/_name.tpl index 9b7e69046a..7719cdbb9f 100644 --- a/kubernetes/common/common/templates/_name.tpl +++ b/kubernetes/common/common/templates/_name.tpl @@ -21,13 +21,23 @@ {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{/* + The same as common.full name but based on passed dictionary instead of trying to figure + out chart name on its own. +*/}} +{{- define "common.fullnameExplicit" -}} + {{- $dot := .dot }} + {{- $name := .chartName }} + {{- printf "%s-%s" (include "common.release" $dot) $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + {{/* Create a default fully qualified application name. Truncated at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). */}} {{- define "common.fullname" -}} {{- $name := default .Chart.Name .Values.nameOverride -}} - {{- printf "%s-%s" (include "common.release" .) $name | trunc 63 | trimSuffix "-" -}} + {{- include "common.fullnameExplicit" (dict "dot" . "chartName" $name) }} {{- end -}} {{/*