First commit for xapp_onboarder that onboards xApp
[it/dev.git] / xapp_onboarder / xapp_onboarder / resources / xapp-std / templates / _helpers.tpl
@@ -18,7 +18,7 @@
 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 -}}
 
 {{/*
@@ -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 ) -}}
-  {{- default $fullname .Values.ricxapp.fullname | trunc 63 | trimSuffix "-" -}}
+  {{- default $fullname .Values.fullname | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
 {{/*
@@ -71,6 +71,9 @@ Create chart name and version as used by the chart label.
   {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
+
 {{- 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