From 3e7dc64805fbfc378290c32e8d4de39c3602e66e Mon Sep 17 00:00:00 2001 From: Mike Elliott Date: Mon, 12 Feb 2018 15:33:55 -0500 Subject: Add common helm chart This helm chart provides common base templates that should be included in each onap subchart. This chart is included as a dependency within a charts requirements.yaml. Change-Id: I0f4e155bcca31de79aa57b4ce45d26e86069ef72 Issue-ID: OOM-265 Signed-off-by: Mike Elliott --- kubernetes/common/common-templates/templates/_namespace.tpl | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 kubernetes/common/common-templates/templates/_namespace.tpl (limited to 'kubernetes/common/common-templates/templates/_namespace.tpl') diff --git a/kubernetes/common/common-templates/templates/_namespace.tpl b/kubernetes/common/common-templates/templates/_namespace.tpl new file mode 100644 index 0000000000..076fd53f7a --- /dev/null +++ b/kubernetes/common/common-templates/templates/_namespace.tpl @@ -0,0 +1,13 @@ +{{/* + Resolve the namespace to apply to a chart. The default namespace suffix + is the name of the chart. This can be overridden if necessary (eg. for subcharts) + using the following value: + + - .Values.nsPrefix : override namespace prefix + - .Values.nsSuffix : override namespace suffix +*/}} +{{- define "common.namespace" -}} + {{- $prefix := default .Release.Name .Values.nsPrefix -}} + {{- $suffix := default .Chart.Name .Values.nsSuffix -}} + {{- printf "%s-%s" $prefix $suffix -}} +{{- end -}} -- cgit 1.2.3-korg