[POLICY] Uses new tpls for repos / images 37/115137/5
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Thu, 19 Nov 2020 17:02:37 +0000 (18:02 +0100)
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>
Fri, 27 Nov 2020 14:18:19 +0000 (14:18 +0000)
This commit makes Policy chart to use the new generator for repositories and
images.

Issue-ID: OOM-2364
Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
Change-Id: Ibc592fdc393e37c075ce905027d49d70fcbe4d84

24 files changed:
kubernetes/policy/components/policy-apex-pdp/requirements.yaml
kubernetes/policy/components/policy-apex-pdp/templates/statefulset.yaml
kubernetes/policy/components/policy-apex-pdp/values.yaml
kubernetes/policy/components/policy-api/requirements.yaml
kubernetes/policy/components/policy-api/templates/deployment.yaml
kubernetes/policy/components/policy-api/values.yaml
kubernetes/policy/components/policy-distribution/requirements.yaml
kubernetes/policy/components/policy-distribution/templates/deployment.yaml
kubernetes/policy/components/policy-distribution/values.yaml
kubernetes/policy/components/policy-drools-pdp/requirements.yaml
kubernetes/policy/components/policy-drools-pdp/templates/statefulset.yaml
kubernetes/policy/components/policy-drools-pdp/values.yaml
kubernetes/policy/components/policy-nexus/requirements.yaml
kubernetes/policy/components/policy-nexus/templates/deployment.yaml
kubernetes/policy/components/policy-nexus/values.yaml
kubernetes/policy/components/policy-pap/requirements.yaml
kubernetes/policy/components/policy-pap/templates/deployment.yaml
kubernetes/policy/components/policy-pap/values.yaml
kubernetes/policy/components/policy-xacml-pdp/requirements.yaml
kubernetes/policy/components/policy-xacml-pdp/templates/deployment.yaml
kubernetes/policy/components/policy-xacml-pdp/values.yaml
kubernetes/policy/requirements.yaml
kubernetes/policy/templates/job.yaml
kubernetes/policy/values.yaml

index 86751ea..506933c 100755 (executable)
@@ -24,3 +24,6 @@ dependencies:
   - name: certInitializer
     version: ~6.x-0
     repository: '@local'
+  - name: repositoryGenerator
+    version: ~6.x-0
+    repository: '@local'
index e9895c2..08c1ba2 100755 (executable)
@@ -61,13 +61,13 @@ spec:
           name: apexconfig-input
         - mountPath: /config
           name: apexconfig
-        image: "{{ .Values.global.envsubstImage }}"
+        image: {{ include "repositoryGenerator.image.envsubst" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-update-config
 {{ include "common.certInitializer.initContainer" . | indent 6 }}
       containers:
         - name: {{ include "common.name" . }}
-          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           command: ["bash","-c"]
           args: ["if [ -f {{ .Values.certInitializer.credsPath }}/.ci ]; then \
index 23788e2..6b13133 100755 (executable)
@@ -22,8 +22,6 @@
 #################################################################
 global:
   nodePortPrefix: 302
-  readinessImage: onap/oom/readiness:3.0.1
-  envsubstImage: dibi/envsubst
   aafEnabled: true
   persistence: {}
 
@@ -51,7 +49,6 @@ secrets:
 # Application configuration defaults.
 #################################################################
 # application image
-repository: nexus3.onap.org:10001
 image: onap/policy-apex-pdp:2.4.4
 pullPolicy: Always
 
index c950237..6191c3e 100755 (executable)
@@ -23,3 +23,6 @@ dependencies:
   - name: certInitializer
     version: ~6.x-0
     repository: '@local'
+  - name: repositoryGenerator
+    version: ~6.x-0
+    repository: '@local'
index 021b49d..72937ae 100755 (executable)
@@ -31,7 +31,7 @@ spec:
               fieldRef:
                 apiVersion: v1
                 fieldPath: metadata.namespace
-          image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
+          image: {{ include "repositoryGenerator.image.readiness" . }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           name: {{ include "common.name" . }}-readiness
         - command:
@@ -53,13 +53,13 @@ spec:
             name: apiconfig
           - mountPath: /config
             name: apiconfig-processed
-          image: "{{ .Values.global.envsubstImage }}"
+          image: {{ include "repositoryGenerator.image.envsubst" . }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           name: {{ include "common.name" . }}-update-config
 {{ include "common.certInitializer.initContainer" . | indent 8 }}
       containers:
         - name: {{ include "common.name" . }}
-          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
 {{- if .Values.global.aafEnabled }}
           command: ["bash","-c"]
index 6f0a590..3657bc1 100755 (executable)
@@ -22,9 +22,7 @@
 global:
   nodePortPrefix: 304
   persistence: {}
-  envsubstImage: dibi/envsubst
   aafEnabled: true
-  readinessImage: onap/oom/readiness:3.0.1
 
 #################################################################
 # Secrets metaconfig
@@ -83,7 +81,6 @@ certInitializer:
 # Application configuration defaults.
 #################################################################
 # application image
-repository: nexus3.onap.org:10001
 image: onap/policy-api:2.3.3
 pullPolicy: Always
 
index 12ce3e0..2777693 100755 (executable)
@@ -24,3 +24,6 @@ dependencies:
   - name: certInitializer
     version: ~6.x-0
     repository: '@local'
+  - name: repositoryGenerator
+    version: ~6.x-0
+    repository: '@local'
index 8dd06e8..0f185fc 100755 (executable)
@@ -67,13 +67,13 @@ spec:
           name: distributionconfig-input
         - mountPath: /config
           name: distributionconfig
-        image: "{{ .Values.global.envsubstImage }}"
+        image: {{ include "repositoryGenerator.image.envsubst" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-update-config
 {{ include "common.certInitializer.initContainer" . | indent 6 }}
       containers:
         - name: {{ include "common.name" . }}
-          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
 {{- if .Values.global.aafEnabled }}
           command: ["bash","-c"]
index 4de0643..a099bb6 100755 (executable)
@@ -61,15 +61,12 @@ secrets:
 #################################################################
 global:
   persistence: {}
-  envsubstImage: dibi/envsubst
   aafEnabled: true
-  readinessImage: onap/oom/readiness:3.0.1
 
 #################################################################
 # Application configuration defaults.
 #################################################################
 # application image
-repository: nexus3.onap.org:10001
 image: onap/policy-distribution:2.4.3
 pullPolicy: Always
 
index ca24480..cd28024 100755 (executable)
@@ -20,3 +20,6 @@ dependencies:
   - name: certInitializer
     version: ~6.x-0
     repository: '@local'
+  - name: repositoryGenerator
+    version: ~6.x-0
+    repository: '@local'
index 1c9e18c..bf6f200 100755 (executable)
@@ -49,7 +49,7 @@ spec:
             fieldRef:
               apiVersion: v1
               fieldPath: metadata.namespace
-        image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
+        image: {{ include "repositoryGenerator.image.readiness" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-db-readiness
 {{- if not .Values.nexus.offline }}
@@ -64,14 +64,14 @@ spec:
             fieldRef:
               apiVersion: v1
               fieldPath: metadata.namespace
-        image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
+        image: {{ include "repositoryGenerator.image.readiness" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-readiness
 {{- end }}
 {{ include "common.certInitializer.initContainer" . | indent 6 }}
       containers:
         - name: {{ include "common.name" . }}
-          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           command: ["bash","-c"]
           args: ["if [ -f {{ .Values.certInitializer.credsPath }}/.ci ]; then \
index 6c865d8..c44691e 100755 (executable)
 #################################################################
 global:
   nodePortPrefix: 302
-  readinessImage: onap/oom/readiness:3.0.1
-  loggingRepository: docker.elastic.co
-  loggingImage: beats/filebeat:5.5.0
-  ubuntuImage: ubuntu:16.04
 
 #################################################################
 # Secrets metaconfig
@@ -38,7 +34,6 @@ secrets:
 # Application configuration defaults.
 #################################################################
 # application image
-repository: nexus3.onap.org:10001
 image: onap/policy-pdpd-cl:1.7.5
 pullPolicy: Always
 
index d3c442d..0b77abe 100755 (executable)
@@ -20,3 +20,6 @@ dependencies:
     # a part of this chart's package and will not
     # be published independently to a repo (at this point)
     repository: '@local'
+  - name: repositoryGenerator
+    version: ~6.x-0
+    repository: '@local'
index 9b76e06..3d5d59f 100755 (executable)
@@ -38,7 +38,7 @@ spec:
     spec:
       initContainers:
       - command: ["sh", "-c", "chown -R 200:200 /share"]
-        image: "{{ .Values.global.ubuntuInitRepository }}/{{ .Values.global.ubuntuInitImage }}"
+        image: {{ include "repositoryGenerator.image.busybox" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-init
         volumeMounts:
@@ -46,7 +46,7 @@ spec:
           name: nexus-data
       containers:
         - name: {{ include "common.name" . }}
-          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+          image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           ports:
           - containerPort: {{ .Values.service.externalPort }}
index 69be914..7801b52 100755 (executable)
 #################################################################
 global:
   nodePortPrefix: 302
-  readinessImage: onap/oom/readiness:3.0.1
-  ubuntuInitRepository: oomk8s
-  ubuntuInitImage: ubuntu-init:1.0.0
   persistence: {}
 
 #################################################################
 # Application configuration defaults.
 #################################################################
 # application image
-repository: nexus3.onap.org:10001
 image: sonatype/nexus:2.14.13-01
 pullPolicy: Always
 
index aa47b48..334988e 100755 (executable)
@@ -24,3 +24,6 @@ dependencies:
   - name: certInitializer
     version: ~6.x-0
     repository: '@local'
+  - name: repositoryGenerator
+    version: ~6.x-0
+    repository: '@local'
index 4f90d81..85312bc 100755 (executable)
@@ -39,7 +39,7 @@ spec:
             fieldRef:
               apiVersion: v1
               fieldPath: metadata.namespace
-        image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
+        image: {{ include "repositoryGenerator.image.readiness" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-readiness
       - command:
@@ -69,13 +69,13 @@ spec:
           name: papconfig
         - mountPath: /config
           name: papconfig-processed
-        image: "{{ .Values.global.envsubstImage }}"
+        image: {{ include "repositoryGenerator.image.envsubst" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-update-config
 {{ include "common.certInitializer.initContainer" . | indent 6 }}
       containers:
         - name: {{ include "common.name" . }}
-          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
 {{- if .Values.global.aafEnabled }}
           command: ["bash","-c"]
index 796fcd0..0ab62ff 100755 (executable)
@@ -24,9 +24,7 @@
 global:
   nodePortPrefixExt: 304
   persistence: {}
-  envsubstImage: dibi/envsubst
   aafEnabled: true
-  readinessImage: onap/oom/readiness:3.0.1
 
 #################################################################
 # Secrets metaconfig
@@ -97,7 +95,6 @@ certInitializer:
 # Application configuration defaults.
 #################################################################
 # application image
-repository: nexus3.onap.org:10001
 image: onap/policy-pap:2.3.3
 pullPolicy: Always
 
index c950237..6191c3e 100755 (executable)
@@ -23,3 +23,6 @@ dependencies:
   - name: certInitializer
     version: ~6.x-0
     repository: '@local'
+  - name: repositoryGenerator
+    version: ~6.x-0
+    repository: '@local'
index e8473d2..449d84b 100755 (executable)
@@ -51,7 +51,7 @@ spec:
             fieldRef:
               apiVersion: v1
               fieldPath: metadata.namespace
-        image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
+        image: {{ include "repositoryGenerator.image.readiness" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-readiness
       - command:
@@ -77,13 +77,13 @@ spec:
           name: pdpxconfig
         - mountPath: /config
           name: pdpxconfig-processed
-        image: "{{ .Values.global.envsubstImage }}"
+        image: {{ include "repositoryGenerator.image.envsubst" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-update-config
 {{ include "common.certInitializer.initContainer" . | indent 6 }}
       containers:
         - name: {{ include "common.name" . }}
-          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
 {{- if .Values.global.aafEnabled }}
           command: ["bash","-c"]
index 24be6c7..acc1d55 100755 (executable)
@@ -21,9 +21,7 @@
 #################################################################
 global:
   persistence: {}
-  envsubstImage: dibi/envsubst
   aafEnabled: true
-  readinessImage: onap/oom/readiness:3.0.1
 
 #################################################################
 # Secrets metaconfig
@@ -88,7 +86,6 @@ certInitializer:
 # Application configuration defaults.
 #################################################################
 # application image
-repository: nexus3.onap.org:10001
 image: onap/policy-xacml-pdp:2.3.3
 pullPolicy: Always
 
index 53ab55d..d924869 100755 (executable)
@@ -48,3 +48,6 @@ dependencies:
     version: ~6.x-0
     repository: 'file://components/policy-distribution'
     condition: policy-distribution.enabled
+  - name: repositoryGenerator
+    version: ~6.x-0
+    repository: '@local'
index 2c51728..f2a5587 100755 (executable)
@@ -33,7 +33,7 @@ spec:
       initContainers:
 #This container checks that all galera instances are up before initializing it.
       - name: {{ include "common.name" . }}-readiness
-        image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
+        image: {{ include "repositoryGenerator.image.readiness" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         command:
         - /app/ready.py
@@ -47,7 +47,7 @@ spec:
               fieldPath: metadata.namespace
       containers:
       - name: {{ include "common.release" . }}-policy-galera-config
-        image: {{ .Values.mariadb_image }}
+        image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.mariadb.image }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         volumeMounts:
         - mountPath: /dbcmd-config/db.sh
index 714f9d9..a623c35 100755 (executable)
@@ -17,7 +17,6 @@
 # Global configuration defaults.
 #################################################################
 global:
-  readinessImage: onap/oom/readiness:3.0.1
   aafEnabled: true
   mariadb:
     # '&mariadbConfig' means we "store" the values for  later use in the file
@@ -76,9 +75,11 @@ policy-nexus:
 #################################################################
 
 repository: nexus3.onap.org:10001
-mariadb_image: library/mariadb:10
 pullPolicy: Always
 
+mariadb:
+  image: mariadb:10.5.8
+
 subChartsOnly:
   enabled: true