X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric-common%2FCommon-Template%2Fhelm%2Fric-common%2Ftemplates%2F_servicename.tpl;h=cd9b7340d5466380a0d046274804d593b3e810c3;hb=49b70f0ba3c7e97b79615161c190b80f40ee8f9b;hp=e4e337fbebaf5a50ec285c6d3c3e2436efd1f1b2;hpb=112e73d383b26192fea6e320ef3de6ef6bfdca0a;p=it%2Fdep.git diff --git a/ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl b/ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl index e4e337fb..cd9b7340 100644 --- a/ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl +++ b/ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl @@ -50,6 +50,11 @@ {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{- define "common.servicename.submgr.rmr" -}} + {{- $name := ( include "common.fullname.submgr" . ) -}} + {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + {{- define "common.servicename.a1mediator.rmr" -}} {{- $name := ( include "common.fullname.a1mediator" . ) -}} {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}} @@ -78,21 +83,41 @@ {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{- define "common.servicename.submgr.http" -}} + {{- $name := ( include "common.fullname.submgr" . ) -}} + {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + {{- define "common.servicename.a1mediator.http" -}} {{- $name := ( include "common.fullname.a1mediator" . ) -}} {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{- define "common.servicename.vespamgr.http" -}} + {{- $name := ( include "common.fullname.vespamgr" . ) -}} + {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + {{- define "common.servicename.nexus.http" -}} {{- $name := ( include "common.fullname.nexus" . ) -}} {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{- define "common.servicename.chartmuseum.http" -}} + {{- $name := ( include "common.fullname.chartmuseum" . ) -}} + {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + {{- define "common.servicename.dashboard.http" -}} {{- $name := ( include "common.fullname.dashboard" . ) -}} {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{- define "common.servicename.ves.http" -}} + {{- $name := ( include "common.fullname.ves" . ) -}} + {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + ###################### TCP Service ################################## @@ -110,3 +135,24 @@ {{- $name := ( include "common.fullname.ves" . ) -}} {{- printf "service-%s-tcp" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} + + + +#################### Default ############### + + +{{/* + Resolve the name of a chart's service. + + The default will be the chart name (or .Values.nameOverride if set). + And the use of .Values.service.name overrides all. + + - .Values.service.name : override default service (ie. chart) name +*/}} +{{/* + Expand the service name for a chart. +*/}} +{{- define "common.servicename" -}} + {{- $name := default .Chart.Name .Values.nameOverride -}} + {{- default $name .Values.service.name | trunc 63 | trimSuffix "-" -}} +{{- end -}} \ No newline at end of file