X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric-platform%2F50-RIC-Platform%2Fhelm%2Fcommon%2Ftemplates%2F_configmapname.tpl;fp=ric-platform%2F50-RIC-Platform%2Fhelm%2Frtmgr%2Ftemplates%2F_helper.tpl;h=2e13e060f21e7b8d119289344fd1fc770fed79ee;hb=04d8123f5b80bddc11cc97c78e994589634a2c7b;hp=46334378451381c25c1d6242e55f97c86c762745;hpb=55b58de117f445405128f87dda7a062d00c3b835;p=it%2Fdep.git diff --git a/ric-platform/50-RIC-Platform/helm/rtmgr/templates/_helper.tpl b/ric-platform/50-RIC-Platform/helm/common/templates/_configmapname.tpl similarity index 58% rename from ric-platform/50-RIC-Platform/helm/rtmgr/templates/_helper.tpl rename to ric-platform/50-RIC-Platform/helm/common/templates/_configmapname.tpl index 46334378..2e13e060 100644 --- a/ric-platform/50-RIC-Platform/helm/rtmgr/templates/_helper.tpl +++ b/ric-platform/50-RIC-Platform/helm/common/templates/_configmapname.tpl @@ -15,36 +15,37 @@ # limitations under the License. # ################################################################################ -{{/* vim: set filetype=mustache: */}} {{/* -Expand the name of the chart. + Resolve the name of a chart's configmap. + */}} -{{- define "rtmgr.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} + + +{{- define "common.configmapname.appmgr" -}} + {{- $name := ( include "common.name.appmgr" . ) -}} + {{- printf "configmap-%s" $name | 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 "rtmgr.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 "-" -}} +{{- define "common.configmapname.dbaas" -}} + {{- $name := ( include "common.name.dbaas" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} + +{{- define "common.configmapname.e2mgr" -}} + {{- $name := ( include "common.name.e2mgr" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} + +{{- define "common.configmapname.e2term" -}} + {{- $name := ( include "common.name.e2term" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "rtmgr.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- define "common.configmapname.rtmgr" -}} + {{- $name := ( include "common.name.rtmgr" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} + + +