[UUI] Update image version 16.0.1 of components of UUI
[oom.git] / kubernetes / common / repositoryGenerator / templates / _repository.tpl
index 211cf1c..14b8cc7 100644 (file)
@@ -1,6 +1,8 @@
 {{/*
 # Copyright © 2017 Amdocs, Bell Canada
-# Copyright © 2021 AT&T
+# Copyright © 2021 AT&T
+# Modifications Copyright (C) 2021 Nordix Foundation.
+# Modifications Copyright © 2024 Deutsche Telekom
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
   {{- include "repositoryGenerator._repositoryHelper" (merge (dict "repoName" "elasticRepository") .) }}
 {{- end -}}
 
+{{/*
+  Resolve the name of the quay.io Repository image repository.
+
+  - .Values.global.quayRepository  : default image quayRepository for all images using quay repository
+  - .Values.quayRepositoryOverride : override global quayRepository repository on a per chart basis
+*/}}
+{{- define "repositoryGenerator.quayRepository" -}}
+  {{- include "repositoryGenerator._repositoryHelper" (merge (dict "repoName" "quayRepository") .) }}
+{{- end -}}
+
 {{/*
   Resolve the name of the googleK8sRepository image repository.
 
   {{- include "repositoryGenerator._repositoryHelper" (merge (dict "repoName" "githubContainerRegistry") .) }}
 {{- end -}}
 
+{{/*
+  Resolve the name of the mariadbRepository image repository.
+
+  - .Values.global.mariadbContainerRegistry  : default image mariadbContainerRegistry for all images used by mariadb.operator
+  - .Values.mariadbContainerRegistryOverride : override global mariadbContainerRegistry repository on a per chart basis
+*/}}
+{{- define "repositoryGenerator.mariadbContainerRegistry" -}}
+  {{- include "repositoryGenerator._repositoryHelper" (merge (dict "repoName" "mariadbContainerRegistry") .) }}
+{{- end -}}
+
 {{- define "repositoryGenerator.image._helper" -}}
   {{- $dot := default . .dot -}}
   {{- $initRoot := default $dot.Values.repositoryGenerator .initRoot -}}
   {{- include "repositoryGenerator.image._helper" (merge (dict "image" "htpasswdImage") .) }}
 {{- end -}}
 
+{{- define "repositoryGenerator.image.jetty" -}}
+  {{- include "repositoryGenerator.image._helper" (merge (dict "image" "jettyImage") .) }}
+{{- end -}}
+
 {{- define "repositoryGenerator.image.jre" -}}
   {{- include "repositoryGenerator.image._helper" (merge (dict "image" "jreImage") .) }}
 {{- end -}}
   {{- include "repositoryGenerator.image._helper" (merge (dict "image" "nginxImage") .) }}
 {{- end -}}
 
+{{- define "repositoryGenerator.image.mongodbImage" -}}
+  {{- include "repositoryGenerator.image._helper" (merge (dict "image" "mongodbImage") .) }}
+{{- end -}}
+
 {{- define "repositoryGenerator.image.postgres" -}}
   {{- include "repositoryGenerator.image._helper" (merge (dict "image" "postgresImage") .) }}
 {{- end -}}
   {{- include "repositoryGenerator.image._helper" (merge (dict "image" "readinessImage") .) }}
 {{- end -}}
 
+{{- define "repositoryGenerator.image.drProvClient" -}}
+  {{- include "repositoryGenerator.image._helper" (merge (dict "image" "drProvClientImage") .) }}
+{{- end -}}
+
+{{- define "repositoryGenerator.image.quitQuit" -}}
+  {{- include "repositoryGenerator.image._helper" (merge (dict "image" "quitQuitImage") .) }}
+{{- end -}}
+
 {{/*
   Resolve the image repository secret token.
   The value for .Values.global.repositoryCred is used if provided:
     mail: email (optional)
   You can also set the same things for dockerHub, elastic and googleK8s if
   needed.
+  if not needed, set global.repositoryCred.user to empty value.
 */}}
 {{- define "repositoryGenerator.secret" -}}
   {{- $dot := default . .dot -}}
   {{- if $subchartDot.Values.global.repositoryCred }}
   {{-   $repo := $subchartDot.Values.global.repository }}
   {{-   $cred := $subchartDot.Values.global.repositoryCred }}
-  {{-   $mail := default "@" $cred.mail }}
-  {{-   $auth := printf "%s:%s" $cred.user $cred.password | b64enc }}
-  {{-   $repoCreds = printf "\"%s\": {\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}" $repo $cred.user $cred.password $mail $auth }}
+  {{-   if $cred.user }}
+  {{-     $mail := default "@" $cred.mail }}
+  {{-     $auth := printf "%s:%s" $cred.user $cred.password | b64enc }}
+  {{-     $repoCreds = printf "\"%s\": {\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}" $repo $cred.user $cred.password $mail $auth }}
+  {{-   end }}
   {{- end }}
   {{- if $subchartDot.Values.global.dockerHubRepositoryCred }}
   {{-   $dhRepo := $subchartDot.Values.global.dockerHubRepository }}
   {{-     $repoCreds = printf "%s, %s" $repoCreds $ghcrRepoCreds }}
   {{-   end }}
   {{- end }}
+  {{- if $subchartDot.Values.global.mariadbContainerRegistryCred }}
+  {{-   $mariadbRepo := $subchartDot.Values.global.mariadbContainerRegistry }}
+  {{-   $mariadbCred := $subchartDot.Values.global.mariadbContainerRegistryCred }}
+  {{-   $mariadbMail := default "@" $mariadbCred.mail }}
+  {{-   $mariadbAuth := printf "%s:%s" $mariadbCred.user $mariadbCred.password | b64enc }}
+  {{-   $mariadbRepoCreds := printf "\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}" $mariadbRepo $mariadbCred.user $mariadbCred.password $mariadbMail $mariadbAuth }}
+  {{-   if eq "" $repoCreds }}
+  {{-     $repoCreds = $mariadbRepoCreds }}
+  {{-   else }}
+  {{-     $repoCreds = printf "%s, %s" $repoCreds $mariadbRepoCreds }}
+  {{-   end }}
+  {{- end }}
   {{- printf "{%s}" $repoCreds | b64enc -}}
 {{- end -}}