Code Review
/
it
/
dev.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
First commit for xapp_onboarder that onboards xApp
[it/dev.git]
/
xapp_onboarder
/
xapp_onboarder
/
resources
/
xapp-std
/
templates
/
_helpers.tpl
diff --git
a/ric-xapps/helm/xapp-std/templates/_helpers.tpl
b/xapp_onboarder/xapp_onboarder/resources/xapp-std/templates/_helpers.tpl
similarity index 89%
rename from
ric-xapps/helm/xapp-std/templates/_helpers.tpl
rename to
xapp_onboarder/xapp_onboarder/resources/xapp-std/templates/_helpers.tpl
index
bb715fd
..
d117edb
100644
(file)
--- a/
ric-xapps/helm/xapp-std/templates/_helpers.tpl
+++ b/
xapp_onboarder/xapp_onboarder/resources/xapp-std/templates/_helpers.tpl
@@
-18,7
+18,7
@@
Expand the name of the chart.
*/}}
{{- define "ricxapp.name" -}}
Expand the name of the chart.
*/}}
{{- define "ricxapp.name" -}}
- {{- default .Chart.Name .Values.
ricxapp.
name | trunc 63 | trimSuffix "-" -}}
+ {{- default .Chart.Name .Values.name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
{{- end -}}
{{/*
@@
-29,7
+29,7
@@
If release name contains chart name it will be used as a full name.
{{- define "ricxapp.fullname" -}}
{{- $name := ( include "ricxapp.name" . ) -}}
{{- $fullname := ( printf "%s-%s" .Release.Namespace $name ) -}}
{{- define "ricxapp.fullname" -}}
{{- $name := ( include "ricxapp.name" . ) -}}
{{- $fullname := ( printf "%s-%s" .Release.Namespace $name ) -}}
- {{- default $fullname .Values.
ricxapp.
fullname | trunc 63 | trimSuffix "-" -}}
+ {{- default $fullname .Values.fullname | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
{{- end -}}
{{/*
@@
-71,6
+71,9
@@
Create chart name and version as used by the chart label.
{{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
+
{{- define "ricxapp.imagepullsecret" -}}
{{- define "ricxapp.imagepullsecret" -}}
- {{- printf "docker-reg-cred" -}}
-{{- end -}}
+ {{- $reponame := .repo -}}
+ {{- $postfix := $reponame | replace "." "-" | replace ":" "-" | replace "/" "-" | trunc 63 | trimSuffix "-" -}}
+ {{- printf "secret-%s" $postfix -}}
+{{- end -}}
\ No newline at end of file