X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=tools%2Fgnbe2-oran-simu%2Ftemplates%2F_helpers.tpl;fp=tools%2Fgnbe2-oran-simu%2Ftemplates%2F_helpers.tpl;h=2d5dd72b04cfd3d15fa75537bb5ac669ce9838ed;hb=7796ee6ea49fe1098f9511873a00c1faadaeba91;hp=0000000000000000000000000000000000000000;hpb=663195b03ce7fca8f82e399be26459771bc89f77;p=ric-plt%2Fe2mgr.git diff --git a/tools/gnbe2-oran-simu/templates/_helpers.tpl b/tools/gnbe2-oran-simu/templates/_helpers.tpl new file mode 100644 index 0000000..2d5dd72 --- /dev/null +++ b/tools/gnbe2-oran-simu/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "gnbe2-oran-simu.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 "gnbe2-oran-simu.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 "gnbe2-oran-simu.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}}