This patch introduces a new structure of the it/dep repo.
[it/dep.git] / ric-platform / 20-Credential / helm / templates / _helper.tpl
similarity index 81%
rename from ricplt/preric/templates/_helper.tpl
rename to ric-platform/20-Credential/helm/templates/_helper.tpl
index cba7024..d009278 100644 (file)
@@ -49,11 +49,7 @@ Create chart name and version as used by the chart label.
 {{- end -}}
 
 {{- define "repository" -}}
-  {{if .Values.repositoryOverride }}
-    {{- printf "%s" .Values.repositoryOverride -}}
-  {{else}}
-    {{- default .Values.repository .Values.global.repository -}}
-  {{end}}
+  {{- default "docker.ricinfra.local:80" .Values.repository -}}
 {{- end -}}
 
 {{/*
@@ -66,21 +62,22 @@ Create chart name and version as used by the chart label.
 */}}
 {{- define "repository.secret" -}}
   {{- $repo := include "repository" . }}
-  {{- $repo := default "${__RUNRICENV_DOCKER_HOST__}:${__RUNRICENV_DOCKER_PORT__}" $repo }}
-  {{- $cred := .Values.global.repositoryCred }}
+  {{- $cred := .Values.repositoryCred }}
+  {{- $user := default "docker" $cred.user }}
+  {{- $password := default "docker" $cred.password }}
   {{- $mail := default "@" $cred.mail }}
-  {{- $auth := printf "%s:%s" $cred.user $cred.password | b64enc }}
-  {{- printf "{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}" $repo $cred.user $cred.password $mail $auth | b64enc -}}
+  {{- $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 "${__RUNRICENV_HELMREPO_USER__}" .Values.global.helmrepoCred.user -}}
+  {{- $user := default "helm" .Values.helmrepoCred.user -}}
   {{- printf "%s" $user |b64enc }}
 {{- end -}}
 
 
 {{- define "helmrepo.secret.password" -}}
-  {{- $pass := default "${__RUNRICENV_HELMREPO_PASS__}" .Values.global.helmrepoCred.password -}}
+  {{- $pass := default "helm" .Values.helmrepoCred.password -}}
   {{- printf "%s" $pass |b64enc }}
 {{- end -}}