aboutsummaryrefslogtreecommitdiffstats
path: root/deployments/helm/servicemesh/istio-operator/templates/_helpers.tpl
diff options
context:
space:
mode:
authorPramod <pramod.raghavendra.jayathirth@intel.com>2019-08-05 15:35:41 -0700
committerPramod <pramod.raghavendra.jayathirth@intel.com>2019-08-05 15:43:14 -0700
commitb54f9760780c88ecd5bb8ae24766849122f871df (patch)
treed365c174bc42429bb2426301d74252a801e5f190 /deployments/helm/servicemesh/istio-operator/templates/_helpers.tpl
parent4fb6acf5a720a0554c08a6f1d3526271b6317cdb (diff)
Helm chart to deploy Istio-operator
Istio-operator is required to manage the lifecycle and deployments of Istio Issue-ID: MULTICLOUD-710 Signed-off-by: Pramod <pramod.raghavendra.jayathirth@intel.com> Change-Id: Ifd2d05e790148096b5c0b454208e233aa5a299f9
Diffstat (limited to 'deployments/helm/servicemesh/istio-operator/templates/_helpers.tpl')
-rw-r--r--deployments/helm/servicemesh/istio-operator/templates/_helpers.tpl32
1 files changed, 32 insertions, 0 deletions
diff --git a/deployments/helm/servicemesh/istio-operator/templates/_helpers.tpl b/deployments/helm/servicemesh/istio-operator/templates/_helpers.tpl
new file mode 100644
index 00000000..065bc1e3
--- /dev/null
+++ b/deployments/helm/servicemesh/istio-operator/templates/_helpers.tpl
@@ -0,0 +1,32 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "istio-operator.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+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).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "istio-operator.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.
+*/}}
+{{- define "istio-operator.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}