X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric-infra%2F40-Credential%2Fhelm%2Ftemplates%2F_helper.tpl;h=e908b87f826bc05b2ac264fcbc8f82674de47cce;hb=112e73d383b26192fea6e320ef3de6ef6bfdca0a;hp=83d4967909221646deff51a2467a6bbdd64c252d;hpb=e01667fb0798c859ec9eeaba88bfb13951efe5f2;p=it%2Fdep.git diff --git a/ric-infra/40-Credential/helm/templates/_helper.tpl b/ric-infra/40-Credential/helm/templates/_helper.tpl index 83d49679..e908b87f 100644 --- a/ric-infra/40-Credential/helm/templates/_helper.tpl +++ b/ric-infra/40-Credential/helm/templates/_helper.tpl @@ -15,39 +15,6 @@ # limitations under the License. # ################################################################################ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "ricapp.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 "ricapp.fullname" -}} -{{- if .Values.ricapp.fullnameOverride -}} -{{- .Values.ricapp.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.ricapp.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 "ricapp.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - {{/* Resolve the image repository secret token. @@ -59,7 +26,7 @@ Create chart name and version as used by the chart label. */}} {{- define "repository.secret" -}} {{- $repo := include "common.repository" . }} - {{- $cred := .Values.repositoryCredential }} + {{- $cred := .Values.credential.repositoryCredential }} {{- $user := default "docker" $cred.user }} {{- $password := default "docker" $cred.password }} {{- $mail := default "@" $cred.mail }} @@ -70,12 +37,12 @@ Create chart name and version as used by the chart label. {{- define "helmrepo.secret.user" -}} - {{- $user := default "helm" .Values.helmrepoCredential.user -}} + {{- $user := default "helm" .Values.credential.helmrepoCredential.user -}} {{- printf "%s" $user |b64enc }} {{- end -}} {{- define "helmrepo.secret.password" -}} - {{- $pass := default "helm" .Values.helmrepoCredential.password -}} + {{- $pass := default "helm" .Values.credential.helmrepoCredential.password -}} {{- printf "%s" $pass |b64enc }} {{- end -}}