From 46d6e5a7f07ea29c11b2cada02b67f04d0c72ad3 Mon Sep 17 00:00:00 2001 From: shucheng Date: Wed, 10 Oct 2018 15:32:10 +0800 Subject: [PATCH] update --- templates/_helpers.tpl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl index 638b07e..84fb766 100644 --- a/templates/_helpers.tpl +++ b/templates/_helpers.tpl @@ -1,9 +1,10 @@ {{/* vim: set filetype=mustache: */}} {{/* Expand the name of the chart. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). */}} {{- define "storageos.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- default "storageos" .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* @@ -11,9 +12,17 @@ Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). */}} {{- define "storageos.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} {{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{- end -}} +{{- end -}} {{/* Create chart name and version as used by the chart label. -- 2.26.0