[COMMON][CertInit] Uses new tpls for repos / images
This commit makes CertInitializer template to use the new generator for
repositories and images.
Issue-ID: OOM-2364
Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
Change-Id: I5efa37225bfe05e2c7be7b8d2420ccaeb10afe62
diff --git a/kubernetes/common/certInitializer/requirements.yaml b/kubernetes/common/certInitializer/requirements.yaml
index 81b0845..3677d45 100644
--- a/kubernetes/common/certInitializer/requirements.yaml
+++ b/kubernetes/common/certInitializer/requirements.yaml
@@ -19,3 +19,6 @@
- name: readinessCheck
version: ~7.x-0
repository: 'file://../readinessCheck'
+ - name: repositoryGenerator
+ version: ~7.x-0
+ repository: 'file://../repositoryGenerator'
diff --git a/kubernetes/common/certInitializer/templates/_certInitializer.yaml b/kubernetes/common/certInitializer/templates/_certInitializer.yaml
index 800364f..c1459bf 100644
--- a/kubernetes/common/certInitializer/templates/_certInitializer.yaml
+++ b/kubernetes/common/certInitializer/templates/_certInitializer.yaml
@@ -44,7 +44,7 @@
{{- $subchartDot := fromJson (include "common.subChartDot" (dict "dot" $dot "initRoot" $initRoot)) }}
{{ include "common.readinessCheck.waitFor" $subchartDot }}
- name: {{ include "common.name" $dot }}-aaf-config
- image: {{ include "common.repository" $subchartDot }}/{{ $subchartDot.Values.global.aafAgentImage }}
+ image: {{ include "repositoryGenerator.repository" $subchartDot }}/{{ $subchartDot.Values.global.aafAgentImage }}
imagePullPolicy: {{ $subchartDot.Values.global.pullPolicy | default $subchartDot.Values.pullPolicy }}
volumeMounts:
- mountPath: {{ $initRoot.mountPath }}
@@ -116,7 +116,7 @@
{{- $initRoot := default $dot.Values.certInitializer .initRoot -}}
{{- $subchartDot := fromJson (include "common.subChartDot" (dict "dot" $dot "initRoot" $initRoot)) }}
- name: {{ include "common.name" $dot }}-import-custom-certs
- image: {{ $subchartDot.Values.global.jreImage }}
+ image: {{ include "repositoryGenerator.image.jre" $subchartDot }}
imagePullPolicy: {{ $subchartDot.Values.global.pullPolicy | default $subchartDot.Values.pullPolicy }}
securityContext:
runAsUser: 0
diff --git a/kubernetes/common/certInitializer/values.yaml b/kubernetes/common/certInitializer/values.yaml
index 66251fa..e7a0a3f 100644
--- a/kubernetes/common/certInitializer/values.yaml
+++ b/kubernetes/common/certInitializer/values.yaml
@@ -13,10 +13,8 @@
# limitations under the License.
global:
- repository: nexus3.onap.org:10001
aafAgentImage: onap/aaf/aaf_agent:2.1.20
aafEnabled: true
- jreImage: registry.gitlab.com/onap-integration/docker/onap-java
pullPolicy: Always
diff --git a/kubernetes/common/repositoryGenerator/templates/_repository.tpl b/kubernetes/common/repositoryGenerator/templates/_repository.tpl
index c351db1..ba22bfb 100644
--- a/kubernetes/common/repositoryGenerator/templates/_repository.tpl
+++ b/kubernetes/common/repositoryGenerator/templates/_repository.tpl
@@ -90,6 +90,10 @@
{{- include "repositoryGenerator.image._helper" (merge (dict "image" "htpasswdImage") .) }}
{{- end -}}
+{{- define "repositoryGenerator.image.jre" -}}
+ {{- include "repositoryGenerator.image._helper" (merge (dict "image" "jreImage") .) }}
+{{- end -}}
+
{{- define "repositoryGenerator.image.kubectl" -}}
{{- include "repositoryGenerator.image._helper" (merge (dict "image" "kubectlImage") .) }}
{{- end -}}
diff --git a/kubernetes/common/repositoryGenerator/values.yaml b/kubernetes/common/repositoryGenerator/values.yaml
index 003782d..def7381 100644
--- a/kubernetes/common/repositoryGenerator/values.yaml
+++ b/kubernetes/common/repositoryGenerator/values.yaml
@@ -25,6 +25,7 @@
envsubstImage: dibi/envsubst:1
# there's only latest image for htpasswd
htpasswdImage: xmartlabs/htpasswd:latest
+ jreImage: onap/integration-java11:7.1.0
kubectlImage: bitnami/kubectl:1.19
loggingImage: beats/filebeat:5.5.0
mariadbImage: bitnami/mariadb:10.5.8
@@ -54,6 +55,7 @@
curlImage: dockerHubRepository
envsubstImage: dockerHubRepository
htpasswdImage: dockerHubRepository
+ jreImage: repository
kubectlImage: dockerHubRepository
loggingImage: elasticRepository
mariadbImage: dockerHubRepository
diff --git a/kubernetes/onap/values.yaml b/kubernetes/onap/values.yaml
index 83dfbfb..1998539 100755
--- a/kubernetes/onap/values.yaml
+++ b/kubernetes/onap/values.yaml
@@ -111,6 +111,9 @@
# image pull policy
pullPolicy: Always
+ # default java image
+ jreImage: onap/integration-java11:7.2.0
+
# default clusterName
# {{ template "common.fullname" . }}.{{ template "common.namespace" . }}.svc.{{ .Values.global.clusterName }}
clusterName: cluster.local