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