From: Mike Elliott Date: Thu, 19 Apr 2018 15:37:37 +0000 (-0400) Subject: Add chart name override to service name tpl X-Git-Tag: 2.0.0-ONAP~253 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=8155f184225a4d4a8a0e11fb6d03d9fee8537472;p=oom.git Add chart name override to service name tpl See issue id for details. Change-Id: Iea807608f7bd315a28032b640f3aa9370adc17eb Issue-ID: OOM-971 Signed-off-by: Mike Elliott --- diff --git a/kubernetes/common/common/templates/_service.tpl b/kubernetes/common/common/templates/_service.tpl index 25e373a7c9..77b77d059a 100644 --- a/kubernetes/common/common/templates/_service.tpl +++ b/kubernetes/common/common/templates/_service.tpl @@ -17,8 +17,8 @@ {{/* Resolve the name of a chart's service. - The default will be the chart name, unless - overridden in the service configuration. + The default will be the chart name (or .Values.nameOverride if set). + And the use of .Values.service.name overrides all. - .Values.service.name : override default service (ie. chart) name */}} @@ -26,5 +26,6 @@ Expand the service name for a chart. */}} {{- define "common.servicename" -}} - {{- default .Chart.Name .Values.service.name | trunc 63 | trimSuffix "-" -}} + {{- $name := default .Chart.Name .Values.nameOverride -}} + {{- default $name .Values.service.name | trunc 63 | trimSuffix "-" -}} {{- end -}} \ No newline at end of file