aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/common
diff options
context:
space:
mode:
authorMike Elliott <mike.elliott@amdocs.com>2018-04-19 11:37:37 -0400
committerMike Elliott <mike.elliott@amdocs.com>2018-04-19 11:37:37 -0400
commit8155f184225a4d4a8a0e11fb6d03d9fee8537472 (patch)
tree97f8d52681285653603f1857df2ad65ed807de1d /kubernetes/common
parent89623667ec00a4710e2c2b9f77a31d369e62f790 (diff)
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 <mike.elliott@amdocs.com>
Diffstat (limited to 'kubernetes/common')
-rw-r--r--kubernetes/common/common/templates/_service.tpl7
1 files changed, 4 insertions, 3 deletions
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