Merge "Use SDC 1.6.5 containers" into frankfurt
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Tue, 19 May 2020 22:09:24 +0000 (22:09 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 19 May 2020 22:09:24 +0000 (22:09 +0000)
84 files changed:
.gitmodules
kubernetes/Makefile
kubernetes/aaf/charts/aaf-locate/values.yaml
kubernetes/aaf/charts/aaf-sshsm/charts/aaf-sshsm-testca/values.yaml
kubernetes/cds/charts/cds-blueprints-processor/resources/config/application.properties
kubernetes/cds/charts/cds-blueprints-processor/templates/deployment.yaml
kubernetes/cds/charts/cds-blueprints-processor/values.yaml
kubernetes/cds/charts/cds-py-executor/Chart.yaml [new file with mode: 0755]
kubernetes/cds/charts/cds-py-executor/requirements.yaml [new file with mode: 0755]
kubernetes/cds/charts/cds-py-executor/templates/deployment.yaml [new file with mode: 0755]
kubernetes/cds/charts/cds-py-executor/templates/secret.yaml [new file with mode: 0644]
kubernetes/cds/charts/cds-py-executor/templates/service.yaml [new file with mode: 0755]
kubernetes/cds/charts/cds-py-executor/values.yaml [new file with mode: 0755]
kubernetes/cds/values.yaml
kubernetes/common/Makefile
kubernetes/common/cassandra/requirements.yaml
kubernetes/common/dgbuilder/requirements.yaml
kubernetes/common/elasticsearch/components/curator/requirements.yaml
kubernetes/common/elasticsearch/components/data/requirements.yaml
kubernetes/common/elasticsearch/components/master/requirements.yaml
kubernetes/common/elasticsearch/requirements.yaml
kubernetes/common/etcd/requirements.yaml
kubernetes/common/mariadb-galera/values.yaml
kubernetes/common/mongo/requirements.yaml
kubernetes/common/music/charts/music-cassandra/requirements.yaml
kubernetes/common/music/requirements.yaml
kubernetes/common/network-name-gen/requirements.yaml
kubernetes/common/postgres/requirements.yaml
kubernetes/common/postgres/values.yaml
kubernetes/dcaegen2/components/dcae-bootstrap/values.yaml
kubernetes/dcaegen2/components/dcae-cloudify-manager/templates/deployment.yaml
kubernetes/dcaegen2/values.yaml
kubernetes/dmaap/components/dmaap-dr-node/values.yaml
kubernetes/esr/charts/esr-gui/templates/deployment.yaml
kubernetes/esr/charts/esr-server/templates/deployment.yaml
kubernetes/helm/plugins/deploy/deploy.sh
kubernetes/modeling/charts/modeling-etsicatalog/values.yaml
kubernetes/policy/charts/drools/values.yaml
kubernetes/policy/charts/policy-distribution/resources/config/config.json
kubernetes/policy/charts/policy-distribution/templates/deployment.yaml
kubernetes/policy/charts/policy-distribution/templates/secrets.yaml [new file with mode: 0644]
kubernetes/policy/charts/policy-distribution/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/sdnc/Makefile
kubernetes/sdnc/components/Makefile [new file with mode: 0644]
kubernetes/sdnc/components/sdnc-prom/Chart.yaml [moved from kubernetes/sdnc/sdnc-prom/Chart.yaml with 100% similarity]
kubernetes/sdnc/components/sdnc-prom/requirements.yaml [moved from kubernetes/sdnc/sdnc-prom/requirements.yaml with 100% similarity]
kubernetes/sdnc/components/sdnc-prom/resources/bin/ensureSdncActive.sh [moved from kubernetes/sdnc/sdnc-prom/resources/bin/ensureSdncActive.sh with 100% similarity]
kubernetes/sdnc/components/sdnc-prom/resources/bin/ensureSdncStandby.sh [moved from kubernetes/sdnc/sdnc-prom/resources/bin/ensureSdncStandby.sh with 100% similarity]
kubernetes/sdnc/components/sdnc-prom/resources/bin/prom.sh [moved from kubernetes/sdnc/sdnc-prom/resources/bin/prom.sh with 100% similarity]
kubernetes/sdnc/components/sdnc-prom/resources/bin/sdnc.cluster [moved from kubernetes/sdnc/sdnc-prom/resources/bin/sdnc.cluster with 100% similarity]
kubernetes/sdnc/components/sdnc-prom/resources/bin/sdnc.dnsswitch [moved from kubernetes/sdnc/sdnc-prom/resources/bin/sdnc.dnsswitch with 100% similarity]
kubernetes/sdnc/components/sdnc-prom/resources/bin/sdnc.failover [moved from kubernetes/sdnc/sdnc-prom/resources/bin/sdnc.failover with 100% similarity]
kubernetes/sdnc/components/sdnc-prom/resources/bin/sdnc.monitor [moved from kubernetes/sdnc/sdnc-prom/resources/bin/sdnc.monitor with 100% similarity]
kubernetes/sdnc/components/sdnc-prom/resources/bin/switchVoting.sh [moved from kubernetes/sdnc/sdnc-prom/resources/bin/switchVoting.sh with 100% similarity]
kubernetes/sdnc/components/sdnc-prom/resources/config/config.json [moved from kubernetes/sdnc/sdnc-prom/resources/config/config.json with 100% similarity]
kubernetes/sdnc/components/sdnc-prom/resources/config/healthchecks.json [moved from kubernetes/sdnc/sdnc-prom/resources/config/healthchecks.json with 100% similarity]
kubernetes/sdnc/components/sdnc-prom/templates/configmap.yaml [moved from kubernetes/sdnc/sdnc-prom/templates/configmap.yaml with 100% similarity]
kubernetes/sdnc/components/sdnc-prom/templates/deployment.yaml [moved from kubernetes/sdnc/sdnc-prom/templates/deployment.yaml with 100% similarity]
kubernetes/sdnc/components/sdnc-prom/templates/pv.yaml [moved from kubernetes/sdnc/sdnc-prom/templates/pv.yaml with 100% similarity]
kubernetes/sdnc/components/sdnc-prom/templates/pvc.yaml [moved from kubernetes/sdnc/sdnc-prom/templates/pvc.yaml with 100% similarity]
kubernetes/sdnc/components/sdnc-prom/values.yaml [moved from kubernetes/sdnc/sdnc-prom/values.yaml with 100% similarity]
kubernetes/so/charts/so-bpmn-infra/values.yaml
kubernetes/so/charts/so-catalog-db-adapter/values.yaml
kubernetes/so/charts/so-monitoring/values.yaml
kubernetes/so/charts/so-nssmf-adapter/values.yaml
kubernetes/so/charts/so-openstack-adapter/values.yaml
kubernetes/so/charts/so-request-db-adapter/values.yaml
kubernetes/so/charts/so-sdc-controller/values.yaml
kubernetes/so/charts/so-sdnc-adapter/values.yaml
kubernetes/so/charts/so-ve-vnfm-adapter/values.yaml
kubernetes/so/charts/so-vfc-adapter/values.yaml
kubernetes/so/charts/so-vnfm-adapter/values.yaml
kubernetes/so/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 08d7aea..ddad6f6 100644 (file)
@@ -1,11 +1,11 @@
 [submodule "kubernetes/aai"]
-       path = kubernetes/aai
-       url = ../aai/oom
-        branch = master
-        ignore = dirty
+  path = kubernetes/aai
+  url = ../aai/oom
+  branch = frankfurt
+  ignore = dirty
 [submodule "kubernetes/robot"]
-       path = kubernetes/robot
-       url = ../testsuite/oom
-        branch = .
-        ignore = dirty
-        
\ No newline at end of file
+  path = kubernetes/robot
+  url = ../testsuite/oom
+  branch = frankfurt
+  ignore = dirty
+
index 7150f10..ee9e8d9 100644 (file)
@@ -28,9 +28,9 @@ endif
 
 SUBMODS := robot aai
 EXCLUDES := config oneclick readiness test dist helm $(PARENT_CHART) dcae $(SUBMODS)
-HELM_CHARTS := $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.))) $(PARENT_CHART)
+HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.)))) $(PARENT_CHART)
 
-.PHONY: $(EXCLUDES) $(HELM_CHARTS) $(SUBMODS)
+.PHONY: $(EXCLUDES) $(HELM_CHARTS)
 
 all: $(COMMON_CHARTS_DIR) $(SUBMODS) $(HELM_CHARTS) plugins
 
index 47b2f20..01a5ab1 100644 (file)
@@ -62,18 +62,18 @@ ingress:
 
 # Configure resource requests and limits
 resources:
 small:
-    limits:
-      cpu: 100m
-      memory: 320Mi
-    requests:
-      cpu: 1m
-      memory: 210Mi
 large:
-    limits:
-      cpu: 400m
-      memory: 1Gi
-    requests:
-      cpu: 40m
-      memory: 500Mi
 unlimited: {}
+ small:
+   limits:
+     cpu: 500m
+     memory: 320Mi
+   requests:
+     cpu: 1m
+     memory: 210Mi
+ large:
+   limits:
+     cpu: 400m
+     memory: 1Gi
+   requests:
+     cpu: 40m
+     memory: 500Mi
+ unlimited: {}
index 3f7782c..dd04c93 100644 (file)
@@ -46,8 +46,8 @@ flavor: small
 resources:
   small:
     limits:
-      cpu: 20m
-      memory: 50Mi
+      cpu: 50m
+      memory: 100Mi
     requests:
       cpu: 10m
       memory: 10Mi
index 94f3466..05ac61c 100755 (executable)
@@ -53,9 +53,9 @@ blueprintsprocessor.db.hibernateDialect=org.hibernate.dialect.MySQL5InnoDBDialec
 
 # processor-db endpoint
 blueprintsprocessor.db.processor-db.type=maria-db
-blueprintsprocessor.db.processor-db.url=jdbc:mysql://{{.Values.config.cdsDB.dbServer}}:{{.Values.config.cdsDB.dbPort}}/{{.Values.config.cdsDB.dbName}}
-blueprintsprocessor.db.processor-db.username=root
-blueprintsprocessor.db.processor-db.password=${CDS_DB_ROOT_PASSWORD}
+blueprintsprocessor.db.processor-db.url=jdbc:mysql://{{ .Values.config.sdncDB.dbService }}:{{ .Values.config.sdncDB.dbPort }}/{{.Values.config.sdncDB.dbName}}
+blueprintsprocessor.db.processor-db.username=${SDNC_DB_USERNAME}
+blueprintsprocessor.db.processor-db.password=${SDNC_DB_PASSWORD}
 
 # Python executor
 blueprints.processor.functions.python.executor.executionPath=/opt/app/onap/scripts/jython/ccsdk_blueprints
index ac0e9c5..161cf28 100755 (executable)
@@ -48,15 +48,16 @@ spec:
         - sh
         args:
         - -c
-        - "cd /config-input && for PFILE in `ls -1 .`; do envsubst '${CDS_DB_USERNAME},${CDS_DB_PASSWORD},${CDS_DB_ROOT_PASSWORD}' <${PFILE} >/config/${PFILE}; done"
+        - "cd /config-input && for PFILE in `ls -1 .`; do envsubst '${CDS_DB_USERNAME},${CDS_DB_PASSWORD},${SDNC_DB_USERNAME},${SDNC_DB_PASSWORD}' <${PFILE} >/config/${PFILE}; done"
         env:
         - name: CDS_DB_USERNAME
           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-db-user-creds" "key" "login") | indent 10}}
         - name: CDS_DB_PASSWORD
           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-db-user-creds" "key" "password") | indent 10}}
-        - name: CDS_DB_ROOT_PASSWORD
-          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-db-root-pass" "key" "password") | indent 10}}
-
+        - name: SDNC_DB_USERNAME
+          value: root
+        - name: SDNC_DB_PASSWORD
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "sdnc-db-root-pass" "key" "password") | indent 10}}
         volumeMounts:
         - mountPath: /config-input/application.properties
           name: {{ include "common.fullname" . }}-config
index f120f12..a14dbad 100755 (executable)
@@ -51,10 +51,10 @@ secrets:
     login: '{{ .Values.config.cdsDB.dbUser }}'
     password: '{{ .Values.config.cdsDB.dbPassword }}'
     passwordPolicy: required
-  - uid: 'cds-db-root-pass'
+  - uid: 'sdnc-db-root-pass'
     type: password
-    externalSecret: '{{ tpl (default "" .Values.config.cdsDB.dbRootPassExternalSecret) . }}'
-    password: '{{ .Values.config.cdsDB.dbRootPassword }}'
+    externalSecret: '{{ tpl (default "" .Values.config.sdncDB.dbRootPassExternalSecret) . }}'
+    password: '{{ .Values.config.sdncDB.dbRootPass }}'
     passwordPolicy: required
 
 #################################################################
@@ -72,6 +72,12 @@ debugEnabled: false
 config:
   appConfigDir: /opt/app/onap/config
   useScriptCompileCache: true
+  sdncDB:
+    dbService: mariadb-galera
+    dbPort: 3306
+    dbName: sdnctl
+    #dbRootPass: Custom root password
+    dbRootPassExternalSecret: '{{ include "common.mariadb.secret.rootPassSecretName" ( dict "dot" . "chartName" .Values.config.sdncDB.dbService ) }}'
   cdsDB:
     dbServer: cds-db
     dbPort: 3306
diff --git a/kubernetes/cds/charts/cds-py-executor/Chart.yaml b/kubernetes/cds/charts/cds-py-executor/Chart.yaml
new file mode 100755 (executable)
index 0000000..41b43c3
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright (c) 2020 Bell Canada, Deutsche Telekom
+#
+# 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.
+
+apiVersion: v1
+description: ONAP CDS Py Executor
+name: cds-py-executor
+version: 6.0.0
\ No newline at end of file
diff --git a/kubernetes/cds/charts/cds-py-executor/requirements.yaml b/kubernetes/cds/charts/cds-py-executor/requirements.yaml
new file mode 100755 (executable)
index 0000000..676fe8f
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright (c) 2020 Bell Canada, Deutsche Telekom
+#
+# 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.
+
+dependencies:
+  - name: common
+    version: ~6.x-0
+    repository: '@local'
\ No newline at end of file
diff --git a/kubernetes/cds/charts/cds-py-executor/templates/deployment.yaml b/kubernetes/cds/charts/cds-py-executor/templates/deployment.yaml
new file mode 100755 (executable)
index 0000000..f9c3377
--- /dev/null
@@ -0,0 +1,90 @@
+# Copyright (c) 2020 Bell Canada, Deutsche Telekom
+#
+# 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.
+
+apiVersion: apps/v1
+kind: Deployment
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector: {{- include "common.selectors" . | nindent 4 }}
+  template:
+    metadata: {{- include "common.templateMetadata" . | nindent 6 }}
+    spec:
+      containers:
+        - name: {{ include "common.name" . }}
+          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+          command:
+            - bash
+          args:
+            - '-c'
+            - 'AUTH_TOKEN=`echo -n $API_USERNAME:$API_PASSWORD | base64` /opt/app/onap/python/start.sh'
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          ports: {{- include "common.containerPorts" . | nindent 12 }}
+          {{ if .Values.liveness.enabled }}
+          livenessProbe:
+            tcpSocket:
+              port: {{ .Values.liveness.port }}
+            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.liveness.periodSeconds }}
+            timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
+          {{ end }}
+          readinessProbe:
+            tcpSocket:
+              port: {{ .Values.liveness.port }}
+            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.readiness.periodSeconds }}
+            timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
+          env:
+          - name: APP_PORT
+            value: {{ .Values.config.appPort }}
+          - name: AUTH_TYPE
+            value: {{ .Values.config.authType }}
+          - name: API_USERNAME
+            {{- include "common.secret.envFromSecret" (dict "global" . "uid" "api-credentials" "key" "login") | nindent 12 }}
+          - name: API_PASSWORD
+            {{- include "common.secret.envFromSecret" (dict "global" . "uid" "api-credentials" "key" "password") | nindent 12 }}
+          - name: LOG_FILE
+            value: {{ .Values.config.logFile }}
+          - name: ARTIFACT_MANAGER_PORT
+            value: {{ .Values.config.artifactManagerPort }}
+          - name: ARTIFACT_MANAGER_SERVER_LOG_FILE
+            value: {{ .Values.config.artifactManagerLogFile }}
+          volumeMounts:
+          - mountPath: /etc/localtime
+            name: localtime
+            readOnly: true
+          - mountPath: {{ .Values.persistence.deployedBlueprint }}
+            name: {{ include "common.fullname" . }}-blueprints
+          resources:
+{{ include "common.resources" . | nindent 12 }}
+        {{- if .Values.nodeSelector }}
+        nodeSelector:
+{{ toYaml .Values.nodeSelector | nindent 10 }}
+        {{- end -}}
+        {{- if .Values.affinity }}
+        affinity:
+{{ toYaml .Values.affinity | nindent 10 }}
+        {{- end }}
+      volumes:
+        - name: localtime
+          hostPath:
+            path: /etc/localtime
+        # Py executor shares the blueprintsprocessor storage (for now) to
+        # share uploaded CBA files. In the future it will be deprecated
+        # when all parts of the CDS will make use of Artifact Manager
+        - name: {{ include "common.fullname" . }}-blueprints
+          persistentVolumeClaim:
+            claimName: {{ include "common.release" . }}-cds-blueprints
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/cds/charts/cds-py-executor/templates/secret.yaml b/kubernetes/cds/charts/cds-py-executor/templates/secret.yaml
new file mode 100644 (file)
index 0000000..c36607b
--- /dev/null
@@ -0,0 +1,15 @@
+# Copyright (c) 2020 Deutsche Telekom
+#
+# 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" . }}
\ No newline at end of file
diff --git a/kubernetes/cds/charts/cds-py-executor/templates/service.yaml b/kubernetes/cds/charts/cds-py-executor/templates/service.yaml
new file mode 100755 (executable)
index 0000000..1267791
--- /dev/null
@@ -0,0 +1,15 @@
+# Copyright (c) 2020 Bell Canada, Deutsche Telekom
+#
+# 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.service" . }}
\ No newline at end of file
diff --git a/kubernetes/cds/charts/cds-py-executor/values.yaml b/kubernetes/cds/charts/cds-py-executor/values.yaml
new file mode 100755 (executable)
index 0000000..206ae10
--- /dev/null
@@ -0,0 +1,120 @@
+# Copyright (c) 2020 Bell Canada, Deutsche Telekom
+#
+# 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 lan`guage governing permissions and
+# limitations under the License.
+
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  # Change to an unused port prefix range to prevent port conflicts
+  # with other instances running within the same k8s cluster
+  nodePortPrefix: 302
+
+  # image repositories
+  repository: nexus3.onap.org:10001
+
+  # readiness check
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:2.0.0
+
+  # image pull policy
+  pullPolicy: Always
+
+  persistence:
+    mountPath: /dockerdata-nfs
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: nexus3.onap.org:10001
+image: onap/ccsdk-py-executor:0.7.2
+pullPolicy: Always
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  port: 50052
+  initialDelaySeconds: 20
+  periodSeconds: 20
+  timeoutSeconds: 20
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  port: 50052
+  initialDelaySeconds: 10
+  periodSeconds: 10
+  timeoutSeconds: 20
+
+service:
+  type: ClusterIP
+  ports:
+  - port: 50052
+    name: executor-grpc
+  - port: 50053
+    name: manager-grpc
+
+secrets:
+  - uid: api-credentials
+    externalSecret: '{{ tpl (default "" .Values.config.authCredentialsExternalSecret) . }}'
+    type: basicAuth
+    login: '{{ .Values.config.apiUsername }}'
+    password: '{{ .Values.config.apiPassword }}'
+    passwordPolicy: required
+
+config:
+  # the api credentials below are used to authenticate communication with blueprint
+  # processor API. Py executor in this context is a client of the blueprint processor
+  apiUsername: ccsdkapps
+  apiPassword: ccsdkapps
+  env:
+    appPort: 50052
+    authType: tls-auth
+    logFile: /dev/stdout
+    artifactManagerPort: 50053
+    artifactManagerLogFile: /dev/stdout
+
+persistence:
+  enabled: true
+  mountSubPath: cds/blueprints/deploy
+  deployedBlueprint: /opt/app/onap/blueprints/deploy
+
+ingress:
+  enabled: false
+
+flavor: small
+
+resources:
+  small:
+    limits:
+      cpu: 2
+      memory: 4Gi
+    requests:
+      cpu: 1
+      memory: 1Gi
+  large:
+    limits:
+      cpu: 4
+      memory: 8Gi
+    requests:
+      cpu: 2
+      memory: 4Gi
+  unlimited: {}
index 1ead35e..d04c22b 100644 (file)
@@ -38,11 +38,6 @@ secrets:
     externalSecret: '{{ ternary "" (tpl (default "" (index .Values "mariadb-galera" "config" "userCredentialsExternalSecret")) .) (hasSuffix "cds-db-secret" (index .Values "mariadb-galera" "config" "userCredentialsExternalSecret"))}}'
     login: '{{ index .Values "mariadb-galera" "config" "userName" }}'
     password: '{{ index .Values "mariadb-galera" "config" "userPassword" }}'
-  - name: &dbRootPasswordSecretName '{{ include "common.release" . }}-cds-db-root-pass'
-    uid: 'cds-db-root-pass'
-    type: password
-    externalSecret: '{{ ternary "" (tpl (default "" (index .Values "mariadb-galera" "config" "mariadbRootPasswordExternalSecret")) .) (hasSuffix "cds-db-root-pass" (index .Values "mariadb-galera" "config" "mariadbRootPasswordExternalSecret"))}}'
-    password: '{{ index .Values "mariadb-galera" "config" "mariadbRootPassword" }}'
 
 #################################################################
 # Application configuration defaults.
@@ -86,7 +81,6 @@ mariadb-galera:
     userName: sdnctl
     # userPassword: sdnctl
     userCredentialsExternalSecret: *dbUserSecretName
-    mariadbRootPasswordExternalSecret: *dbRootPasswordSecretName
     mysqlDatabase: &mysqlDbName sdnctl
   nameOverride: &dbServer cds-db
   service:
@@ -104,7 +98,6 @@ cds-blueprints-processor:
       dbPort: 3306
       dbName: *mysqlDbName
       dbCredsExternalSecret: *dbUserSecretName
-      dbRootPassExternalSecret: *dbRootPasswordSecretName
 
 #Resource Limit flavor -By Default using small
 flavor: small
index 5bd503e..941c2f8 100644 (file)
@@ -20,7 +20,7 @@ SECRET_DIR := $(OUTPUT_DIR)/secrets
 COMMON_CHARTS_DIR := common
 
 EXCLUDES :=
-HELM_CHARTS := $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.)))
+HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
 
 .PHONY: $(EXCLUDES) $(HELM_CHARTS)
 
@@ -49,4 +49,4 @@ clean:
        @rm -f *tgz */charts/*tgz
        @rm -rf $(PACKAGE_DIR)
 %:
-       @:
\ No newline at end of file
+       @:
index bab2c4b..90e6621 100644 (file)
@@ -16,4 +16,4 @@
 dependencies:
   - name: common
     version: ~6.x-0
-    repository: '@local'
+    repository: 'file://../common'
index 7d56bf2..4735901 100644 (file)
@@ -15,4 +15,4 @@
 dependencies:
   - name: common
     version: ~6.x-0
-    repository: '@local'
\ No newline at end of file
+    repository: 'file://../common'
index ff65593..e9a5a5f 100644 (file)
@@ -15,4 +15,4 @@
 dependencies:
   - name: common
     version: ~6.x-0
-    repository: '@local'
\ No newline at end of file
+    repository: 'file://../../../common'
index 6a61926..a1f72ff 100644 (file)
@@ -15,4 +15,4 @@
 dependencies:
   - name: common
     version: ~6.x-0
-    repository: '@local'
\ No newline at end of file
+    repository: 'file://../../../common'
index 6a61926..a1f72ff 100644 (file)
@@ -15,4 +15,4 @@
 dependencies:
   - name: common
     version: ~6.x-0
-    repository: '@local'
\ No newline at end of file
+    repository: 'file://../../../common'
index 84fa71c..8a02fef 100644 (file)
@@ -15,7 +15,7 @@
 dependencies:
   - name: common
     version: ~6.x-0
-    repository: '@local'
+    repository: 'file://../common'
   - name: master
     version: ~6.x-0
     repository: 'file://components/master'
@@ -27,4 +27,3 @@ dependencies:
     version: ~6.x-0
     repository: 'file://components/curator'
     condition: elasticsearch.curator.enabled,curator.enabled
-
index facbc44..e90e615 100644 (file)
@@ -15,4 +15,4 @@
 dependencies:
   - name: common
     version: ~6.x-0
-    repository: '@local'
+    repository: 'file://../common'
index 6decff2..af08ea3 100644 (file)
@@ -129,7 +129,7 @@ ingress:
 ## Configure MariaDB-Galera with a custom my.cnf file
 ## ref: https://mariadb.com/kb/en/mariadb/configuring-mariadb-with-mycnf/#example-of-configuration-file
 ##
-externalConfig: {}
+externalConfig: ""
 # externalConfig: |-
   # [mysqld]
   # innodb_buffer_pool_size=2G
index f994771..6ba617e 100644 (file)
@@ -15,4 +15,4 @@
 dependencies:
   - name: common
     version: ~6.x-0
-    repository: '@local'
+    repository: 'file://../common'
index 38536fc..0a80d65 100644 (file)
@@ -15,4 +15,4 @@
 dependencies:
   - name: common
     version: ~6.x-0
-    repository: '@local'
\ No newline at end of file
+    repository: 'file://../../../common'
index a7089ea..1c428d2 100644 (file)
@@ -15,4 +15,4 @@
 dependencies:
   - name: common
     version: ~6.x-0
-    repository: '@local'
+    repository: 'file://../common'
index 8152196..8c2277c 100644 (file)
 dependencies:\r
   - name: common\r
     version: ~6.x-0\r
-    repository: '@local'\r
+    repository: 'file://../common'\r
   - name: mariadb-galera\r
     version: ~6.x-0\r
-    repository: '@local'\r
+    repository: 'file://../mariadb-galera'\r
     condition: global.mariadbGalera.localCluster\r
   - name: mariadb-init\r
     version: ~6.x-0\r
-    repository: '@local'\r
+    repository: 'file://../mariadb-init'\r
     condition: not global.mariadbGalera.localCluster\r
index 76afd96..6f898b6 100644 (file)
@@ -15,4 +15,4 @@
 dependencies:
   - name: common
     version: ~6.x-0
-    repository: '@local'
+    repository: 'file://../common'
index 10f9405..a5a4163 100644 (file)
@@ -58,9 +58,9 @@ pullPolicy: Always
 config:
   pgUserName: testuser
   pgDatabase: userdb
-  pgPrimaryPassword: password
-  pgUserPassword: password
-  pgRootPassword: password
+  pgPrimaryPassword: password
+  pgUserPassword: password
+  pgRootPassword: password
 
 container:
   name:
index 5fcd916..a9cac8b 100644 (file)
@@ -107,7 +107,7 @@ mongo:
 
 # application image
 repository: nexus3.onap.org:10001
-image: onap/org.onap.dcaegen2.deployments.k8s-bootstrap-container:1.12.5
+image: onap/org.onap.dcaegen2.deployments.k8s-bootstrap-container:1.12.6
 default_k8s_location: central
 
 # DCAE component images to be deployed via Cloudify Manager
index 9bee051..8a03e90 100644 (file)
@@ -65,6 +65,19 @@ spec:
         volumeMounts:
             - mountPath: /opt/app/osaaf
               name: tls-info
+      {{- if .Values.persistence.enabled }}
+      - name: remove-lost-found
+        image: "{{ .Values.global.busyboxRepository }}/{{ .Values.global.busyboxImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        volumeMounts:
+        - mountPath: /cfy-persist
+          name: cm-persistent
+        command:
+        - /bin/sh
+        args:
+        - -c
+        - "rm -rf '/cfy-persist/lost+found';"
+      {{- end }}
       containers:
         - name: {{ include "common.name" . }}
           image: "{{ include "common.repository" . }}/{{ .Values.image }}"
index 25ddfc7..aff40d4 100644 (file)
@@ -22,5 +22,7 @@ global:
   tlsImage: onap/org.onap.dcaegen2.deployments.tls-init-container:2.1.0
   consulLoaderRepository: nexus3.onap.org:10001
   consulLoaderImage: onap/org.onap.dcaegen2.deployments.consul-loader-container:1.0.0
+  busyboxRepository: docker.io
+  busyboxImage: library/busybox:1.30
 redis:
   replicaCount: 6
index 5c32d99..8b44e16 100644 (file)
@@ -144,6 +144,7 @@ service:
   type: NodePort
   name: dmaap-dr-node
   useNodePortExt: true
+  both_tls_and_plain: true
   annotations:
     service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
   ports:
index 9319485..9c70d32 100644 (file)
@@ -31,6 +31,27 @@ spec:
         app: {{ include "common.name" . }}
         release: {{ include "common.release" . }}
     spec:
+      securityContext:
+        runAsUser: 1000
+        runAsGroup: 1001
+        fsGroup: 1001
+      initContainers:
+      - command:
+        - cp
+        args:
+        - -r
+        - -T
+        - /home/esr/tomcat
+        - /opt/tomcat
+        securityContext:
+          privileged: true
+        image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: create-tomcat-dir
+        volumeMounts:
+        - name: tomcat-workdir
+          mountPath: /opt/tomcat
+
       containers:
         - name: {{ include "common.name" . }}
           image: "{{ include "common.repository" . }}/{{ .Values.image }}"
@@ -54,15 +75,23 @@ spec:
           env:
             - name: MSB_ADDR
               value: {{ tpl .Values.msbaddr . }}
+          volumeMounts:
+            - name: tomcat-workdir
+              mountPath: /home/esr/tomcat/
           resources:
 {{ include "common.resources" . | indent 12 }}
         {{- if .Values.nodeSelector }}
-        nodeSelector:
+          nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 10 }}
         {{- end -}}
         {{- if .Values.affinity }}
-        affinity:
+          affinity:
 {{ toYaml .Values.affinity | indent 10 }}
         {{- end }}
+
+      volumes:
+      - name: tomcat-workdir
+        emptyDir: {}
+
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"
index d670428..995a409 100644 (file)
@@ -31,6 +31,27 @@ spec:
         app: {{ include "common.name" . }}
         release: {{ include "common.release" . }}
     spec:
+      securityContext:
+        runAsUser: 1000
+        runAsGroup: 1001
+        fsGroup: 1001
+      initContainers:
+      - command:
+        - cp
+        args:
+        - -r
+        - -T
+        - /home/esr/conf
+        - /opt/conf
+        securityContext:
+          privileged: true
+        image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: create-conf-dir
+        volumeMounts:
+        - name: conf-dir
+          mountPath: /opt/conf
+
       containers:
         - name: {{ .Chart.Name }}
           image: "{{ include "common.repository" . }}/{{ .Values.image }}"
@@ -60,6 +81,8 @@ spec:
             readOnly: true
           - mountPath: /home/esr/works/logs
             name: {{ include "common.fullname" . }}-logs
+          - mountPath: /home/esr/conf
+            name: conf-dir
           resources:
 {{ include "common.resources" . | indent 12 }}
         {{- if .Values.nodeSelector }}
@@ -72,6 +95,9 @@ spec:
         {{- end }}
         # Filebeat sidecar container
         - name: {{ include "common.name" . }}-filebeat-onap
+          securityContext:
+            runAsUser: 1000
+            runAsGroup: 1000
           image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           volumeMounts:
@@ -99,5 +125,8 @@ spec:
           emptyDir: {}
         - name:  {{ include "common.fullname" . }}-logs
           emptyDir: {}
+        - name: conf-dir
+          emptyDir: {}
+
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"
index 3da189b..bb98a3b 100755 (executable)
@@ -151,9 +151,6 @@ deploy() {
   # clear previously cached charts
   rm -rf $CACHE_DIR
 
-  # create log driectory
-  mkdir -p $LOG_DIR
-
   # fetch umbrella chart (parent chart containing subcharts)
   if [[ -d "$CHART_URL" ]]; then
     mkdir -p $CHART_DIR
@@ -169,6 +166,9 @@ deploy() {
     helm fetch $CHART_URL --untar --untardir $CACHE_DIR $VERSION
   fi
 
+  # create log driectory
+  mkdir -p $LOG_DIR
+
   # move out subcharts to process separately
   mkdir -p $CACHE_SUBCHART_DIR
   mv $CHART_DIR/charts/* $CACHE_SUBCHART_DIR/
index a278a47..30ca493 100644 (file)
@@ -62,7 +62,7 @@ mariadb-galera:
 flavor: small
 
 repository: nexus3.onap.org:10001
-image: onap/modeling/etsicatalog:1.0.5
+image: onap/modeling/etsicatalog:1.0.6
 pullPolicy: Always
 
 #Istio sidecar injection policy
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 9062633..4c42ed2 100644 (file)
@@ -21,8 +21,8 @@
     "restServerParameters":{
         "host":"0.0.0.0",
         "port":6969,
-        "userName":"healthcheck",
-        "password":"zb!XztG34",
+        "userName":"${RESTSERVER_USER}",
+        "password":"${RESTSERVER_PASSWORD}",
         "https":true
     },
     "receptionHandlerParameters":{
@@ -61,8 +61,8 @@
                 "messageBusAddress": [
                     "message-router"
                  ],
-                "user": "policy",
-                "password": "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U",
+                "user": "${SDCBE_USER}",
+                "password": "${SDCBE_PASSWORD}",
                 "pollingInterval":20,
                 "pollingTimeout":30,
                 "consumerId": "policy-id",
                 "apiParameters": {
                 "hostName": "policy-api",
                 "port": 6969,
-                  "userName": "healthcheck",
-                  "password": "zb!XztG34"
+                  "userName": "${API_USER}",
+                  "password": "${API_PASSWORD}"
                  },
                 "papParameters": {
                   "hostName": "policy-pap",
                   "port": 6969,
-                 "userName": "healthcheck",
-                "password": "zb!XztG34"
+                 "userName": "${PAP_USER}",
+                "password": "${PAP_PASSWORD}"
                 },
                 "isHttps": true,
                 "deployPolicies": true
index 65961d8..b3b017a 100644 (file)
@@ -16,6 +16,37 @@ spec:
         app: {{ include "common.name" . }}
         release: {{ include "common.release" . }}
     spec:
+      initContainers:
+      - command:
+        - sh
+        args:
+        - -c
+        - "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 }}
+        - name: RESTSERVER_PASSWORD
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restserver-creds" "key" "password") | indent 10 }}
+        - name: API_USER
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "apiparameters-creds" "key" "login") | indent 10 }}
+        - name: API_PASSWORD
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "apiparameters-creds" "key" "password") | indent 10 }}
+        - name: PAP_USER
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "papparameters-creds" "key" "login") | indent 10 }}
+        - name: PAP_PASSWORD
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "papparameters-creds" "key" "password") | indent 10 }}
+        - name: SDCBE_USER
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "sdcbe-creds" "key" "login") | indent 10 }}
+        - name: SDCBE_PASSWORD
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "sdcbe-creds" "key" "password") | indent 10 }}
+        volumeMounts:
+        - mountPath: /config-input
+          name: distributionconfig-input
+        - mountPath: /config
+          name: distributionconfig
+        image: "{{ .Values.global.envsubstImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: {{ include "common.name" . }}-update-config
       containers:
         - name: {{ include "common.name" . }}
           image: "{{ include "common.repository" . }}/{{ .Values.image }}"
@@ -58,9 +89,12 @@ spec:
         - name: localtime
           hostPath:
              path: /etc/localtime
-        - name: distributionconfig
+        - name: distributionconfig-input
           configMap:
             name: {{ include "common.fullname" . }}-configmap
             defaultMode: 0755
+        - name: distributionconfig
+          emptyDir:
+            medium: Memory
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/policy/charts/policy-distribution/templates/secrets.yaml b/kubernetes/policy/charts/policy-distribution/templates/secrets.yaml
new file mode 100644 (file)
index 0000000..bd7eb8e
--- /dev/null
@@ -0,0 +1,15 @@
+# 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 835bfc4..c8d24e5 100644 (file)
 #  SPDX-License-Identifier: Apache-2.0
 #  ============LICENSE_END=========================================================
 
+#################################################################
+# Secrets metaconfig
+#################################################################
+secrets:
+  - uid: restserver-creds
+    type: basicAuth
+    externalSecret: '{{ tpl (default "" .Values.restServer.credsExternalSecret) . }}'
+    login: '{{ .Values.restServer.user }}'
+    password: '{{ .Values.restServer.password }}'
+    passwordPolicy: required
+  - uid: apiparameters-creds
+    type: basicAuth
+    externalSecret: '{{ tpl (default "" .Values.apiParameters.credsExternalSecret) . }}'
+    login: '{{ .Values.apiParameters.user }}'
+    password: '{{ .Values.apiParameters.password }}'
+    passwordPolicy: required
+  - uid: papparameters-creds
+    type: basicAuth
+    externalSecret: '{{ tpl (default "" .Values.papParameters.credsExternalSecret) . }}'
+    login: '{{ .Values.papParameters.user }}'
+    password: '{{ .Values.papParameters.password }}'
+    passwordPolicy: required
+  - uid: sdcbe-creds
+    type: basicAuth
+    externalSecret: '{{ tpl (default "" .Values.sdcBe.credsExternalSecret) . }}'
+    login: '{{ .Values.sdcBe.user }}'
+    password: '{{ .Values.sdcBe.password }}'
+    passwordPolicy: required
+
 #################################################################
 # Global configuration defaults.
 #################################################################
 global:
   persistence: {}
+  envsubstImage: dibi/envsubst
 
 #################################################################
 # Application configuration defaults.
@@ -36,6 +66,19 @@ debugEnabled: false
 
 # application configuration
 
+restServer:
+  user: healthcheck
+  password: zb!XztG34
+apiParameters:
+  user: healthcheck
+  password: zb!XztG34
+papParameters:
+  user: healthcheck
+  password: zb!XztG34
+sdcBe:
+  user: policy
+  password: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
+
 # default number of instances
 replicaCount: 1
 
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 c810626..fc6143a 160000 (submodule)
@@ -1 +1 @@
-Subproject commit c81062626b69160145baac5e6a5d670cb67211fa
+Subproject commit fc6143a31ef4a55d649f8e5384f661671274331c
index d634a8c..e4b5dda 100644 (file)
@@ -18,8 +18,8 @@ OUTPUT_DIR := $(ROOT_DIR)/../dist
 PACKAGE_DIR := $(OUTPUT_DIR)/packages
 SECRET_DIR := $(OUTPUT_DIR)/secrets
 
-EXCLUDES :=
-HELM_CHARTS := $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.)))
+EXCLUDES := dist resources templates charts
+HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
 
 .PHONY: $(EXCLUDES) $(HELM_CHARTS)
 
@@ -48,4 +48,4 @@ clean:
        @rm -f *tgz */charts/*tgz
        @rm -rf $(PACKAGE_DIR)
 %:
-       @:
\ No newline at end of file
+       @:
diff --git a/kubernetes/sdnc/components/Makefile b/kubernetes/sdnc/components/Makefile
new file mode 100644 (file)
index 0000000..4e73763
--- /dev/null
@@ -0,0 +1,51 @@
+# Copyright © 2017 Amdocs, Bell Canada
+#
+# 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.
+
+# FIXME OOM-765
+ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+OUTPUT_DIR := $(ROOT_DIR)/../../dist
+PACKAGE_DIR := $(OUTPUT_DIR)/packages
+SECRET_DIR := $(OUTPUT_DIR)/secrets
+
+EXCLUDES :=
+HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
+
+.PHONY: $(EXCLUDES) $(HELM_CHARTS)
+
+all: $(HELM_CHARTS)
+
+$(HELM_CHARTS):
+       @echo "\n[$@]"
+       @make package-$@
+
+make-%:
+       @if [ -f $*/Makefile ]; then make -C $*; fi
+
+dep-%: make-%
+       @if [ -f $*/requirements.yaml ]; then helm dep up $*; fi
+
+lint-%: dep-%
+       @if [ -f $*/Chart.yaml ]; then helm lint $*; fi
+
+package-%: lint-%
+       @mkdir -p $(PACKAGE_DIR)
+       @if [ -f $*/Chart.yaml ]; then helm package -d $(PACKAGE_DIR) $*; fi
+       @helm repo index $(PACKAGE_DIR)
+
+clean:
+       @rm -f */requirements.lock
+       @rm -f *tgz */charts/*tgz
+       @rm -rf $(PACKAGE_DIR)
+%:
+       @:
index b04343f..71c7cee 100755 (executable)
@@ -57,7 +57,7 @@ secrets:
 # Application configuration defaults.
 #################################################################
 repository: nexus3.onap.org:10001
-image: onap/so/bpmn-infra:1.6.0
+image: onap/so/bpmn-infra:1.6.1
 pullPolicy: Always
 
 db:
index b616abc..4d30ae7 100755 (executable)
@@ -54,7 +54,7 @@ secrets:
 # Application configuration defaults.
 #################################################################
 repository: nexus3.onap.org:10001
-image: onap/so/catalog-db-adapter:1.6.0
+image: onap/so/catalog-db-adapter:1.6.1
 pullPolicy: Always
 
 db:
index 910b694..e3f5c3c 100644 (file)
@@ -57,7 +57,7 @@ secrets:
 # Application configuration defaults.
 #################################################################
 repository: nexus3.onap.org:10001
-image: onap/so/so-monitoring:1.6.0
+image: onap/so/so-monitoring:1.6.1
 pullPolicy: Always
 
 db:
index 44536a8..6a5f5fb 100755 (executable)
@@ -69,7 +69,7 @@ secrets:
 # Application configuration defaults.
 #################################################################
 repository: nexus3.onap.org:10001
-image: onap/so/nssmf-adapter:1.6.0
+image: onap/so/nssmf-adapter:1.6.1
 pullPolicy: Always
 
 db:
index ea8dd0d..f2cd74d 100755 (executable)
@@ -51,7 +51,7 @@ secrets:
 #################################################################
 # Application configuration defaults.
 #################################################################
-image: onap/so/openstack-adapter:1.6.0
+image: onap/so/openstack-adapter:1.6.1
 pullPolicy: Always
 repository: nexus3.onap.org:10001
 
index 2f89042..9018c09 100755 (executable)
@@ -52,7 +52,7 @@ secrets:
 # Application configuration defaults.
 #################################################################
 repository: nexus3.onap.org:10001
-image: onap/so/request-db-adapter:1.6.0
+image: onap/so/request-db-adapter:1.6.1
 pullPolicy: Always
 
 db:
index a38e256..31fdb63 100755 (executable)
@@ -52,7 +52,7 @@ secrets:
 # Application configuration defaults.
 #################################################################
 repository: nexus3.onap.org:10001
-image: onap/so/sdc-controller:1.6.0
+image: onap/so/sdc-controller:1.6.1
 pullPolicy: Always
 
 db:
index 42c5d4d..ce42af0 100755 (executable)
@@ -55,7 +55,7 @@ secrets:
 # Application configuration defaults.
 #################################################################
 repository: nexus3.onap.org:10001
-image: onap/so/sdnc-adapter:1.6.0
+image: onap/so/sdnc-adapter:1.6.1
 pullPolicy: Always
 
 db:
index 1d9854c..434a3e1 100755 (executable)
@@ -37,7 +37,7 @@ secrets:
 #################################################################
 # Application configuration defaults.
 #################################################################
-image: onap/so/ve-vnfm-adapter:1.6.0
+image: onap/so/ve-vnfm-adapter:1.6.1
 pullPolicy: Always
 replicaCount: 1
 service:
index aa4923a..28ca701 100755 (executable)
@@ -52,7 +52,7 @@ secrets:
 # Application configuration defaults.
 #################################################################
 repository: nexus3.onap.org:10001
-image: onap/so/vfc-adapter:1.6.0
+image: onap/so/vfc-adapter:1.6.1
 pullPolicy: Always
 
 db:
index 72efcb4..f911e49 100755 (executable)
@@ -40,7 +40,7 @@ secrets:
 # Application configuration defaults.
 #################################################################
 repository: nexus3.onap.org:10001
-image: onap/so/vnfm-adapter:1.6.0
+image: onap/so/vnfm-adapter:1.6.1
 pullPolicy: Always
 
 replicaCount: 1
index feb0017..a8910b2 100755 (executable)
@@ -137,7 +137,7 @@ dbCreds:
   adminName: so_admin
 
 repository: nexus3.onap.org:10001
-image: onap/so/api-handler-infra:1.6.0
+image: onap/so/api-handler-infra:1.6.1
 pullPolicy: Always
 replicaCount: 1
 minReadySeconds: 10
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