aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBorislav Glozman <Borislav.Glozman@amdocs.com>2020-02-02 13:15:34 +0000
committerGerrit Code Review <gerrit@onap.org>2020-02-02 13:15:34 +0000
commit7336084fc365977b9588add74d1009fd039b46c3 (patch)
treeec84cc3ed95568e4ac0808597b8179c16d06343c
parent8a4eb36da4b949d45ddd0f283d50c41276dba681 (diff)
parent4377cc6b77948ae3d280d48288370db5b50b6ac2 (diff)
Merge "[COMMON] Allow to generate fullname based on passed chart name"
-rw-r--r--kubernetes/common/common/templates/_name.tpl12
1 files changed, 11 insertions, 1 deletions
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
@@ -22,12 +22,22 @@
{{- 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 -}}
{{/*