X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fcommon%2Fcommon%2Ftemplates%2F_name.tpl;h=9b7e69046af61fbb3b774c35b11c1aa7ea24073f;hb=137d7ccd2597a6492e926818eebab2f6067fb382;hp=f84ca21f3a15880f21b936e9e87a6dd6bd79c85b;hpb=03b1009c7b791ea3252237f79367ff0501460f16;p=oom.git diff --git a/kubernetes/common/common/templates/_name.tpl b/kubernetes/common/common/templates/_name.tpl index f84ca21f3a..9b7e69046a 100644 --- a/kubernetes/common/common/templates/_name.tpl +++ b/kubernetes/common/common/templates/_name.tpl @@ -27,7 +27,7 @@ */}} {{- define "common.fullname" -}} {{- $name := default .Chart.Name .Values.nameOverride -}} - {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} + {{- printf "%s-%s" (include "common.release" .) $name | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* @@ -37,5 +37,5 @@ this function would answer back "toto". */}} {{- define "common.release" -}} - {{- regexReplaceAll "-[a-zA-Z0-9]*$" .Release.Name "" }} + {{- first (regexSplit "-" .Release.Name -1) }} {{- end -}}