aboutsummaryrefslogtreecommitdiffstats
path: root/kud/tests/vnfs/comp-app/collection/app3/helm/m3db/templates/_helpers.tpl
diff options
context:
space:
mode:
authorRitu Sood <Ritu.Sood@intel.com>2020-06-26 19:29:26 +0000
committerGerrit Code Review <gerrit@onap.org>2020-06-26 19:29:26 +0000
commit45270cad1aa53056360e870fa026dea01c00d51f (patch)
tree704dd1622b8babe780ddd32268b5c276e1ef884d /kud/tests/vnfs/comp-app/collection/app3/helm/m3db/templates/_helpers.tpl
parent7696e3865b96f0bb49333fbdf68c03057df8c74b (diff)
parent27b59a675fa767ad91239d89528a90e515539595 (diff)
Merge "Integrate M3DB and prometheus & enable remoteWrite"
Diffstat (limited to 'kud/tests/vnfs/comp-app/collection/app3/helm/m3db/templates/_helpers.tpl')
-rw-r--r--kud/tests/vnfs/comp-app/collection/app3/helm/m3db/templates/_helpers.tpl32
1 files changed, 32 insertions, 0 deletions
diff --git a/kud/tests/vnfs/comp-app/collection/app3/helm/m3db/templates/_helpers.tpl b/kud/tests/vnfs/comp-app/collection/app3/helm/m3db/templates/_helpers.tpl
new file mode 100644
index 00000000..36544b12
--- /dev/null
+++ b/kud/tests/vnfs/comp-app/collection/app3/helm/m3db/templates/_helpers.tpl
@@ -0,0 +1,32 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "m3db.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 "m3db.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 "m3db.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}