X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric-xapps%2F90-xApps%2Fhelm%2Fxapp-std%2Ftemplates%2F_helpers.tpl;fp=ric-xapps%2F90-xApps%2Fhelm%2Fxapp-std%2Ftemplates%2F_helpers.tpl;h=d427a461bb4333d080ca6aa47075c30290593ce2;hb=563da71692a22c4ad04089f756fcebb86944e787;hp=e2309bf55ad5b08211bb4a2357fe2eb3e1f0fe01;hpb=97a3693d4035b13c6aa0c80f1dceefa1cd10ce5b;p=it%2Fdep.git diff --git a/ric-xapps/90-xApps/helm/xapp-std/templates/_helpers.tpl b/ric-xapps/90-xApps/helm/xapp-std/templates/_helpers.tpl index e2309bf5..d427a461 100644 --- a/ric-xapps/90-xApps/helm/xapp-std/templates/_helpers.tpl +++ b/ric-xapps/90-xApps/helm/xapp-std/templates/_helpers.tpl @@ -19,7 +19,7 @@ Expand the name of the chart. */}} {{- define "ricxapp.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} + {{- default .Chart.Name .Values.ricxapp.name | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* @@ -28,23 +28,16 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this If release name contains chart name it will be used as a full name. */}} {{- define "ricxapp.fullname" -}} -{{- if .Values.ricxapp.fullnameOverride -}} -{{- .Values.ricxapp.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.ricxapp.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} + {{- $name := ( include "ricxapp.name" . ) -}} + {{- $fullname := ( printf "%s-%s" .Release.Namespace $name ) -}} + {{- default $fullname .Values.ricxapp.fullname | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* Create chart name and version as used by the chart label. */}} {{- define "ricxapp.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} + {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} {{- define "ricxapp.namespace" -}} @@ -74,6 +67,11 @@ Create chart name and version as used by the chart label. {{- end -}} +{{- define "ricxapp.containername" -}} + {{- $name := ( include "ricxapp.fullname" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + {{- define "ricxapp.imagepullsecret" -}} {{- printf "docker-reg-cred" -}} {{- end -}}