[COMMON] New templates to handle repositories
[oom.git] / kubernetes / common / common / templates / _repository.tpl
index 272db42..0316ae7 100644 (file)
@@ -15,6 +15,8 @@
 */}}
 
 {{/*
+  /!\ DEPRECATED /!\
+  Will be removed when transition to "repositoryGenerator" is finished.
   Resolve the name of the common image repository.
   The value for .Values.repository is used by default,
   unless either override mechanism is used.
     {{- default .Values.repository .Values.global.repository -}}
   {{end}}
 {{- end -}}
-
-
-{{/*
-  Resolve the image repository secret token.
-  The value for .Values.global.repositoryCred is used:
-  repositoryCred:
-    user: user
-    password: password
-    mail: email (optional)
-*/}}
-{{- define "common.repository.secret" -}}
-  {{- $repo := include "common.repository" . }}
-  {{- $repo := default "nexus3.onap.org:10001" $repo }}
-  {{- $cred := .Values.global.repositoryCred }}
-  {{- $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 -}}
-{{- end -}}