Merge "Add Helm charts for CDS py-executor"
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Mon, 11 May 2020 06:36:46 +0000 (06:36 +0000)
committerGerrit Code Review <gerrit@onap.org>
Mon, 11 May 2020 06:36:46 +0000 (06:36 +0000)
19 files changed:
kubernetes/multicloud/charts/multicloud-k8s/values.yaml
kubernetes/policy/charts/drools/values.yaml
kubernetes/policy/charts/policy-xacml-pdp/resources/config/xacml.properties
kubernetes/policy/charts/policy-xacml-pdp/templates/deployment.yaml
kubernetes/portal/charts/portal-app/values.yaml
kubernetes/portal/charts/portal-mariadb/resources/config/mariadb/oom_updates.sql
kubernetes/robot
kubernetes/sdc/charts/sdc-be/values.yaml
kubernetes/sdc/charts/sdc-cs/values.yaml
kubernetes/sdc/charts/sdc-fe/values.yaml
kubernetes/sdc/charts/sdc-onboarding-be/values.yaml
kubernetes/sdc/charts/sdc-wfd-be/values.yaml
kubernetes/sdc/charts/sdc-wfd-fe/values.yaml
kubernetes/vnfsdk/resources/config/configuration.xml [new file with mode: 0644]
kubernetes/vnfsdk/templates/configmap.yaml
kubernetes/vnfsdk/templates/deployment.yaml
kubernetes/vnfsdk/templates/job.yaml
kubernetes/vnfsdk/templates/secrets.yaml [new file with mode: 0644]
kubernetes/vnfsdk/values.yaml

index 3c7b1d3..f0bfedb 100644 (file)
@@ -27,7 +27,7 @@ global:
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/multicloud/k8s:0.5.0
+image: onap/multicloud/k8s:0.6.0
 pullPolicy: Always
 
 # flag to enable debugging - application support required
index 0126c6e..3552b2e 100644 (file)
@@ -82,7 +82,7 @@ ingress:
 # Default installation values to be overridden
 
 server:
-  jvmOpts: -server -Xms1024m -Xmx2048m
+  jvmOpts: -server -XshowSettings:vm
 
 aaf:
   enabled: "false"
index f2c2cd7..c7e4ad1 100644 (file)
@@ -50,4 +50,4 @@ xacml.pip.engines=count-recent-operations,get-operation-outcome
 javax.persistence.jdbc.driver=org.mariadb.jdbc.Driver
 javax.persistence.jdbc.url=jdbc:mariadb://{{ .Values.global.mariadb.service.name }}:{{ .Values.global.mariadb.service.internalPort }}/operationshistory
 javax.persistence.jdbc.user=${SQL_USER}
-javax.persistence.jdbc.password=${SQL_PASSWORD}
+javax.persistence.jdbc.password=${SQL_PASSWORD_BASE64}
index 9ac5d68..bd126b8 100644 (file)
@@ -35,7 +35,7 @@ spec:
         - sh
         args:
         - -c
-        - "cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done"
+        - "export SQL_PASSWORD_BASE64=`echo -n ${SQL_PASSWORD} | base64`; cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done"
         env:
         - name: RESTSERVER_USER
           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restserver-creds" "key" "login") | indent 10 }}
@@ -45,6 +45,10 @@ spec:
           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "api-creds" "key" "login") | indent 10 }}
         - name: API_PASSWORD
           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "api-creds" "key" "password") | indent 10 }}
+        - name: SQL_USER
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
+        - name: SQL_PASSWORD
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
         volumeMounts:
         - mountPath: /config-input
           name: pdpxconfig
@@ -59,11 +63,6 @@ spec:
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           command: ["/opt/app/policy/pdpx/bin/policy-pdpx.sh"]
           args: ["/opt/app/policy/pdpx/etc/mounted/config.json"]
-          env:
-          - name: SQL_USER
-            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
-          - name: SQL_PASSWORD
-            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
           ports:
           - containerPort: {{ .Values.service.internalPort }}
           # disable liveness probe when breakpoints set in debugger
index 8d18fd0..01bc0da 100644 (file)
@@ -32,7 +32,7 @@ global:
 
 # application image
 repository: nexus3.onap.org:10001
-image: onap/portal-app:3.2.0
+image: onap/portal-app:3.2.1
 pullPolicy: Always
 
 #AAF local config
index 13b319c..7502e93 100644 (file)
@@ -78,7 +78,7 @@ update fn_app set app_username='aaiui', app_password='4LK69amiIFtuzcl6Gsv97Tt7ML
 /*
 Replace spaces with underscores for role names to match AAF role names
 */
-UPDATE fn_role SET role_name= REPLACE(role_name, ' ', '_') WHERE active_yn= 'Y';
+UPDATE fn_role SET role_name= REPLACE(role_name, ' ', '_') WHERE active_yn= 'Y' AND role_id NOT IN (999);
 
 
 /*
index 6423337..91827be 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 64233373f3e5699d3cc7b154cedeb7d70826a667
+Subproject commit 91827be0924c4db10687474ed5db2f7c63f6568a
index e0af28f..a0e9b53 100644 (file)
@@ -28,8 +28,8 @@ global:
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/sdc-backend:1.6.4
-backendInitImage: onap/sdc-backend-init:1.6.4
+image: onap/sdc-backend:1.6.5
+backendInitImage: onap/sdc-backend-init:1.6.5
 pullPolicy: Always
 
 # flag to enable debugging - application support required
index 6c63927..3cef2cf 100644 (file)
@@ -28,8 +28,8 @@ global:
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/sdc-cassandra:1.6.4
-cassandraInitImage: onap/sdc-cassandra-init:1.6.4
+image: onap/sdc-cassandra:1.6.5
+cassandraInitImage: onap/sdc-cassandra-init:1.6.5
 
 pullPolicy: Always
 
index e5d41eb..8754d0f 100644 (file)
@@ -28,7 +28,7 @@ global:
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/sdc-frontend:1.6.4
+image: onap/sdc-frontend:1.6.5
 pullPolicy: Always
 
 config:
index 4cfebbf..0471c03 100644 (file)
@@ -28,8 +28,8 @@ global:
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/sdc-onboard-backend:1.6.4
-onboardingInitImage: onap/sdc-onboard-cassandra-init:1.6.4
+image: onap/sdc-onboard-backend:1.6.5
+onboardingInitImage: onap/sdc-onboard-cassandra-init:1.6.5
 pullPolicy: Always
 
 # flag to enable debugging - application support required
index 8bab2c8..05793d4 100644 (file)
@@ -28,8 +28,8 @@ global:
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/workflow-backend:1.6.4
-configInitImage: onap/workflow-init:1.6.4
+image: onap/sdc-workflow-backend:1.7.0
+configInitImage: onap/sdc-workflow-init:1.7.0
 pullPolicy: Always
 
 initJob:
index 359c33a..aaa7795 100644 (file)
@@ -28,7 +28,7 @@ global:
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/workflow-frontend:1.6.4
+image: onap/sdc-workflow-frontend:1.7.0
 pullPolicy: Always
 
 # flag to enable debugging - application support required
diff --git a/kubernetes/vnfsdk/resources/config/configuration.xml b/kubernetes/vnfsdk/resources/config/configuration.xml
new file mode 100644 (file)
index 0000000..6bd4e1c
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2017 Huawei Technologies Co., Ltd.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!DOCTYPE configuration
+PUBLIC "//mybatis.org//DTD Config 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-config.dtd">
+<configuration>
+    <environments default="development">
+        <environment id="development">
+            <transactionManager type="JDBC" />
+            <dataSource type="UNPOOLED">
+                <property name="driver" value="org.postgresql.Driver" />
+                <property name="url" value="jdbc:postgresql://{{ .Values.postgres.service.name }}:{{ .Values.postgres.service.externalPort }}/marketplaceDB" />
+                <property name="username" value="${PG_USER}" />
+                <property name="password" value="${PG_PASSWORD}" />
+            </dataSource>
+        </environment>
+    </environments>
+    <mappers>
+        <mapper resource="mybatis/sql/MarketplaceMapper.xml" />
+    </mappers>
+</configuration>
index 44d5f41..0c39e6e 100644 (file)
@@ -23,4 +23,4 @@ metadata:
     release: {{ include "common.release" . }}
     heritage: {{ .Release.Service }}
 data:
-{{ tpl (.Files.Glob "resources/config/marketplace_tables_postgres.sql").AsConfig . | indent 2 }}
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
index bd187db..3f4d6c4 100644 (file)
@@ -34,6 +34,25 @@ spec:
       name: {{ include "common.name" . }}
     spec:
       initContainers:
+      - command:
+        - sh
+        args:
+        - -c
+        - "cd /config-input && for PFILE in `find . -not -type d | grep -v -F ..`; do envsubst <${PFILE} >/config/${PFILE}; done"
+        env:
+        - name: PG_USER
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "login") | indent 10 }}
+        - name: PG_PASSWORD
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "password") | indent 10 }}
+        volumeMounts:
+        - mountPath: /config-input
+          name: init-data-input
+        - mountPath: /config
+          name: init-data
+        image: "{{ .Values.global.envsubstImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: {{ include "common.name" . }}-update-config
+
       - command:
         - /root/ready.py
         args:
@@ -54,9 +73,10 @@ spec:
         name: {{ include "common.name" . }}
         resources:
 {{ include "common.resources" . | indent 12 }}
-        env:
-        - name: POSTGRES_SERVICE_HOST
-          value: "$(VNFSDK_DBSET_SERVICE_HOST)"
+        volumes:
+        - mountPath: /service/webapps/ROOT/WEB-INF/classes/mybatis/configuration/configuration.xml
+          name: init-data
+          subPath: configuration.xml
         readinessProbe:
           tcpSocket:
             port: {{ .Values.service.internalPort }}
@@ -64,3 +84,10 @@ spec:
           periodSeconds: {{ .Values.readiness.periodSeconds }}
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      volumes:
+      - name: init-data-input
+        configMap:
+          name: {{ include "common.fullname" . }}
+      - name: init-data
+        emptyDir:
+          medium: Memory
index 2ec7b95..1d0dd29 100644 (file)
@@ -51,13 +51,15 @@ spec:
         image: "{{ .Values.postgresRepository }}/{{ .Values.postgresImage }}"
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         env:
+        - name: PGUSER
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "login") | indent 10 }}
         - name: PGPASSWORD
-          value: "{{ .Values.postgres.config.pgUserPassword }}"
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "password") | indent 10 }}
         command:
         - /bin/sh
         - -c
         - |
-          psql -U {{ .Values.postgres.config.pgUserName }} -h $(VNFSDK_DBPRI_SERVICE_HOST) -f /aaa/init/marketplace_tables_postgres.sql
+          psql -h $(VNFSDK_DBPRI_SERVICE_HOST) -f /aaa/init/marketplace_tables_postgres.sql
         volumeMounts:
         - name: init-data
           mountPath: /aaa/init/marketplace_tables_postgres.sql
diff --git a/kubernetes/vnfsdk/templates/secrets.yaml b/kubernetes/vnfsdk/templates/secrets.yaml
new file mode 100644 (file)
index 0000000..b143034
--- /dev/null
@@ -0,0 +1,16 @@
+{{/*
+# Copyright © 2020 Samsung Electronics
+# #
+# # Licensed under the Apache License, Version 2.0 (the "License");
+# # you may not use this file except in compliance with the License.
+# # You may obtain a copy of the License at
+# #
+# #       http://www.apache.org/licenses/LICENSE-2.0
+# #
+# # Unless required by applicable law or agreed to in writing, software
+# # distributed under the License is distributed on an "AS IS" BASIS,
+# # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# # See the License for the specific language governing permissions and
+# # limitations under the License.
+*/}}
+{{ include "common.secretFast" . }}
index 28dea47..82bef2d 100644 (file)
@@ -22,6 +22,22 @@ global:
   readinessImage: readiness-check:2.0.0
   loggingRepository: docker.elastic.co
   loggingImage: beats/filebeat:5.5.0
+  envsubstImage: dibi/envsubst
+
+secrets:
+  - uid: pg-root-pass
+    name: &pgRootPassSecretName '{{ include "common.release" . }}-vnfsdk-pg-root-pass'
+    type: password
+    externalSecret: '{{ ternary "" (tpl (default "" .Values.postgres.config.pgRootPasswordExternalSecret) .) (hasSuffix "vnfsdk-pg-root-pass" .Values.postgres.config.pgRootPasswordExternalSecret) }}'
+    password: '{{ .Values.postgres.config.pgRootpassword }}'
+    policy: generate
+  - uid: pg-user-creds
+    name: &pgUserCredsSecretName '{{ include "common.release" . }}-vnfsdk-pg-user-creds'
+    type: basicAuth
+    externalSecret: '{{ ternary "" (tpl (default "" .Values.postgres.config.pgUserExternalSecret) .) (hasSuffix "vnfsdk-pg-user-creds" .Values.postgres.config.pgUserExternalSecret) }}'
+    login: '{{ .Values.postgres.config.pgUserName }}'
+    password: '{{ .Values.postgres.config.pgUserPassword }}'
+    passwordPolicy: generate
 
 #################################################################
 # Application configuration defaults.
@@ -50,9 +66,8 @@ postgres:
   config:
     pgUserName: postgres
     pgDatabase: postgres
-    pgPrimaryPassword: postgres
-    pgUserPassword: postgres
-    pgRootPassword: postgres
+    pgUserExternalSecret: *pgUserCredsSecretName
+    pgRootPasswordExternalSecret: *pgRootPassSecretName
 
 # flag to enable debugging - application support required
 debugEnabled: false