X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric-infra%2F20-Credential%2Fhelm%2Ftemplates%2F_helper.tpl;fp=ric-infra%2F20-Credential%2Fhelm%2Ftemplates%2F_helper.tpl;h=0000000000000000000000000000000000000000;hb=e01667fb0798c859ec9eeaba88bfb13951efe5f2;hp=83d4967909221646deff51a2467a6bbdd64c252d;hpb=ad7f56d736f082b4882ca9be81ae40c27e240881;p=it%2Fdep.git diff --git a/ric-infra/20-Credential/helm/templates/_helper.tpl b/ric-infra/20-Credential/helm/templates/_helper.tpl deleted file mode 100644 index 83d49679..00000000 --- a/ric-infra/20-Credential/helm/templates/_helper.tpl +++ /dev/null @@ -1,81 +0,0 @@ -################################################################################ -# Copyright (c) 2019 AT&T Intellectual Property. # -# Copyright (c) 2019 Nokia. # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); # -# you may not use this file except in compliance with the License. # -# You may obtain a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" BASIS, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# 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. - The value for .Values.global.repositoryCred is used: - repositoryCred: - user: user - password: password - mail: email (optional) -*/}} -{{- define "repository.secret" -}} - {{- $repo := include "common.repository" . }} - {{- $cred := .Values.repositoryCredential }} - {{- $user := default "docker" $cred.user }} - {{- $password := default "docker" $cred.password }} - {{- $mail := default "@" $cred.mail }} - {{- $auth := printf "%s:%s" $user $password | b64enc }} - {{- printf "{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}" $repo $user $password $mail $auth | b64enc -}} -{{- end -}} - - - -{{- define "helmrepo.secret.user" -}} - {{- $user := default "helm" .Values.helmrepoCredential.user -}} - {{- printf "%s" $user |b64enc }} -{{- end -}} - - -{{- define "helmrepo.secret.password" -}} - {{- $pass := default "helm" .Values.helmrepoCredential.password -}} - {{- printf "%s" $pass |b64enc }} -{{- end -}}