Merge "Add parameter http scheme for multicloud adapter"
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Thu, 5 Mar 2020 13:26:13 +0000 (13:26 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 5 Mar 2020 13:26:13 +0000 (13:26 +0000)
30 files changed:
docs/oom_cloud_setup_guide.rst
docs/oom_user_guide.rst
kubernetes/aaf/charts/aaf-gui/values.yaml
kubernetes/aaf/charts/aaf-sms/values.yaml
kubernetes/aai
kubernetes/clamp/charts/clamp-dash-es/values.yaml
kubernetes/clamp/charts/clamp-dash-kibana/values.yaml
kubernetes/clamp/charts/clamp-dash-logstash/values.yaml
kubernetes/consul/charts/consul-server/values.yaml
kubernetes/contrib/tools/rke/rke_setup.sh
kubernetes/dcaegen2/components/dcae-bootstrap/resources/inputs/k8s-hv_ves-inputs.yaml
kubernetes/dcaegen2/components/dcae-bootstrap/values.yaml
kubernetes/dmaap/components/dmaap-bc/values.yaml
kubernetes/dmaap/components/dmaap-dr-prov/resources/config/provserver.properties
kubernetes/dmaap/components/dmaap-dr-prov/templates/deployment.yaml
kubernetes/dmaap/components/dmaap-dr-prov/templates/secret.yaml [new file with mode: 0644]
kubernetes/dmaap/components/dmaap-dr-prov/values.yaml
kubernetes/oof/charts/oof-has/resources/config/conductor.conf
kubernetes/sdnc/charts/dmaap-listener/templates/secret.yaml [new file with mode: 0644]
kubernetes/sdnc/charts/dmaap-listener/values.yaml
kubernetes/sdnc/charts/sdnc-ansible-server/values.yaml
kubernetes/sdnc/charts/sdnc-portal/resources/config/admportal.json
kubernetes/sdnc/charts/sdnc-portal/resources/config/dblib.properties
kubernetes/sdnc/charts/sdnc-portal/resources/config/svclogic.properties
kubernetes/sdnc/charts/sdnc-portal/resources/config/svclogic.properties.sdnctldb02
kubernetes/sdnc/charts/sdnc-portal/templates/deployment.yaml
kubernetes/sdnc/charts/sdnc-portal/templates/secrets.yaml
kubernetes/sdnc/charts/sdnc-portal/values.yaml
kubernetes/sdnc/charts/ueb-listener/values.yaml
kubernetes/vid/values.yaml

index 899f0d7..e3790f8 100644 (file)
@@ -53,6 +53,7 @@ The versions of Kubernetes that are supported by OOM are as follows:
   casablanca         1.11.5       2.9.1   1.11.5    17.03.x
   dublin             1.13.5       2.12.3  1.13.5    18.09.5
   el alto            1.15.2       2.14.2  1.15.2    18.09.x
+  frankfurt          1.15.9       2.16.3  1.15.9    18.09.x
   ==============     ===========  ======  ========  ========
 
 Minimum Hardware Configuration
index 48701f7..4cc1ab6 100644 (file)
@@ -114,7 +114,7 @@ stable which should be removed to avoid confusion::
 
 To prepare your system for an installation of ONAP, you'll need to::
 
-  > git clone -b casablanca http://gerrit.onap.org/r/oom
+  > git clone -b frankfurt http://gerrit.onap.org/r/oom
   > cd oom/kubernetes
 
 
@@ -294,7 +294,7 @@ value for the vnfDeployment/openstack/oam_network_cidr key as shown below.
 
 To deploy ONAP with this environment file, enter::
 
-  > helm deploy local/onap -n casablanca -f environments/onap-production.yaml
+  > helm deploy local/onap -n onap -f environments/onap-production.yaml
 
 .. include:: environments_onap_demo.yaml
    :code: yaml
@@ -600,14 +600,14 @@ sequence of events described in the previous paragraph would be initiated.
 For example, to upgrade a container by changing configuration, specifically an
 environment value::
 
-  > helm deploy casablanca onap/so --version 2.0.1 --set enableDebug=true
+  > helm deploy onap onap/so --version 2.0.1 --set enableDebug=true
 
 Issuing this command will result in the appropriate container being stopped by
 Kubernetes and replaced with a new container with the new environment value.
 
 To upgrade a component to a new version with a new configuration file enter::
 
-  > helm deploy casablanca onap/so --version 2.0.2 -f environments/demo.yaml
+  > helm deploy onbap onap/so --version 2.0.2 -f environments/demo.yaml
 
 To fetch release history enter::
 
@@ -700,19 +700,19 @@ from a running deployment the operator perform a 'dry-run' to display exactly
 what will happen with a given command prior to actually deleting anything.  For
 example::
 
-  > helm undeploy casablanca --dry-run
+  > helm undeploy onap --dry-run
 
-will display the outcome of deleting the 'casablanca' release from the
+will display the outcome of deleting the 'onap' release from the
 deployment.
 To completely delete a release and remove it from the internal store enter::
 
-  > helm undeploy casablanca --purge
+  > helm undeploy onap --purge
 
 One can also remove individual components from a deployment by changing the
 ONAP configuration values.  For example, to remove `so` from a running
 deployment enter::
 
-  > helm undeploy casablanca-so --purge
+  > helm undeploy onap-so --purge
 
 will remove `so` as the configuration indicates it's no longer part of the
 deployment. This might be useful if a one wanted to replace just `so` by
index 1f7abd4..a603322 100644 (file)
@@ -67,7 +67,7 @@ ingress:
 resources:
  small:
    limits:
-     cpu: 20m
+     cpu: 200m
      memory: 280Mi
    requests:
      cpu: 1m
index 41bde75..c0d43b8 100644 (file)
@@ -89,7 +89,7 @@ resources:
   small:
     limits:
       cpu: 100m
-      memory: 30Mi
+      memory: 400Mi
     requests:
       cpu: 25m
       memory: 10Mi
@@ -98,6 +98,6 @@ resources:
       cpu: 400m
       memory: 1Gi
     requests:
-      cpu: 10m
+      cpu: 25m
       memory: 100Mi
   unlimited: {}
index ac0ea8a..c9fad71 160000 (submodule)
@@ -1 +1 @@
-Subproject commit ac0ea8aa12226ac95683838e92d22928eb221630
+Subproject commit c9fad710ea31ae6695c3914429266621d37ce8b8
index ae7abd5..27158a6 100644 (file)
@@ -32,7 +32,7 @@ busyboxImage: library/busybox:latest
 
 # application image
 repository: nexus3.onap.org:10001
-image: onap/clamp-dashboard-elasticsearch:5.0.2
+image: onap/clamp-dashboard-elasticsearch:5.0.3
 pullPolicy: Always
 
 # flag to enable debugging - application support required
index be0c40e..8e640a4 100644 (file)
@@ -34,7 +34,7 @@ busyboxImage: library/busybox:latest
 
 # application image
 repository: nexus3.onap.org:10001
-image: onap/clamp-dashboard-kibana:5.0.2
+image: onap/clamp-dashboard-kibana:5.0.3
 pullPolicy: Always
 
 # flag to enable debugging - application support required
index 9a0321a..3ec5684 100644 (file)
@@ -30,7 +30,7 @@ flavor: small
 
 # application image
 repository: nexus3.onap.org:10001
-image: onap/clamp-dashboard-logstash:5.0.2
+image: onap/clamp-dashboard-logstash:5.0.3
 pullPolicy: Always
 
 # flag to enable debugging - application support required
index 2eb3c25..e9c96d1 100644 (file)
@@ -56,7 +56,7 @@ service:
   name: consul-server
   portName: consul-join
   internalPort: 8301
-  type2: NodePort
+  type2: ClusterIP
   portName2: consul-ui
   internalPort2: 8500
   nodePort2: 70
index 409da39..cde7d4c 100755 (executable)
@@ -21,7 +21,7 @@
 # https://wiki.onap.org/display/DW/OOM+RKE+Kubernetes+Deployment
 # source from https://jira.onap.org/browse/OOM-1598
 #
-# master/dublin 
+# master/dublin
 #     RKE 0.1.16 Kubernetes 1.11.6, kubectl 1.11.6, Helm 2.9.1, Docker 18.06
 #     20190428 RKE 0.2.1, Kubernetes 1.13.5, kubectl 1.13.5, Helm 2.12.3, Docker 18.09.5
 # single node install, HA pending
@@ -30,7 +30,7 @@ usage() {
 cat <<EOF
 Usage: $0 [PARAMs]
 example
-sudo ./rke_setup.sh -b dublin -s rke.onap.cloud -e onap -l amdocs -v true
+sudo ./rke_setup.sh -b master -s rke.onap.cloud -e onap -l amdocs -v true
 -u                  : Display usage
 -b [branch]         : branch = master or dublin (required)
 -s [server]         : server = IP or DNS name (required)
@@ -48,16 +48,16 @@ install_onap() {
   KUBECTL_VERSION=1.13.5
   HELM_VERSION=2.12.3
   DOCKER_VERSION=18.09
+
   # copy your private ssh key and cluster.yml file to the vm
   # on your dev machine
   #sudo cp ~/.ssh/onap_rsa .
-  #sudo chmod 777 onap_rsa 
+  #sudo chmod 777 onap_rsa
   #scp onap_rsa ubuntu@192.168.241.132:~/
   # on this vm
-  #sudo chmod 400 onap_rsa 
+  #sudo chmod 400 onap_rsa
   #sudo cp onap_rsa ~/.ssh
-  # make sure public key is insetup correctly in 
+  # make sure public key is insetup correctly in
   # sudo vi ~/.ssh/authorized_keys
 
   echo "please supply your ssh key as provided by the -k keyname - it must be be chmod 400 and chown user:user in ~/.ssh/"
@@ -66,8 +66,8 @@ install_onap() {
   echo "specifically"
   echo "address: $SERVER"
   echo "user: $USERNAME"
-  echo "ssh_key_path: $SSHPATH_PREFIX/$SSHKEY" 
-  
+  echo "ssh_key_path: $SSHPATH_PREFIX/$SSHKEY"
+
   RKETOOLS=
   HYPERCUBE=
   POD_INFRA_CONTAINER=
index a6fbea1..5ece12c 100644 (file)
@@ -18,3 +18,4 @@
 {{ if .Values.componentImages.hv_ves }}
 tag_version: {{ include "common.repository" . }}/{{ .Values.componentImages.hv_ves }}
 {{ end }}
+use_tls: true
\ No newline at end of file
index 11a3622..cfdff5a 100644 (file)
@@ -109,7 +109,7 @@ mongo:
 
 # application image
 repository: nexus3.onap.org:10001
-image: onap/org.onap.dcaegen2.deployments.k8s-bootstrap-container:1.9.0
+image: onap/org.onap.dcaegen2.deployments.k8s-bootstrap-container:1.10.0
 default_k8s_location: central
 
 # DCAE component images to be deployed via Cloudify Manager
@@ -123,7 +123,7 @@ componentImages:
   ves: onap/org.onap.dcaegen2.collectors.ves.vescollector:1.5.3
   snmptrap: onap/org.onap.dcaegen2.collectors.snmptrap:1.4.0
   prh: onap/org.onap.dcaegen2.services.prh.prh-app-server:1.5.0
-  hv_ves: onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main:1.3.0
+  hv_ves: onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main:1.4.0
 
 # Resource Limit flavor -By Default using small
 flavor: small
index 5139630..046f64d 100644 (file)
@@ -30,7 +30,7 @@ pullPolicy: Always
 
 # application images
 repository: nexus3.onap.org:10001
-image: onap/dmaap/dmaap-bc:1.1.5
+image: onap/dmaap/dmaap-bc:2.0.3
 
 
 # application configuration
index 34662ae..b672311 100644 (file)
@@ -7,9 +7,9 @@
 # * 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.
@@ -40,9 +40,9 @@ org.onap.dmaap.datarouter.provserver.isaddressauthenabled = false
 
 # Database access
 org.onap.dmaap.datarouter.db.driver   = org.mariadb.jdbc.Driver
-org.onap.dmaap.datarouter.db.url      = jdbc:mariadb://{{.Values.config.dmaapDrDb.mariadbServiceName}}:{{.Values.config.dmaapDrDb.mariadbServicePort}}/datarouter
-org.onap.dmaap.datarouter.db.login    = datarouter
-org.onap.dmaap.datarouter.db.password = datarouter
+org.onap.dmaap.datarouter.db.url      = jdbc:mariadb://{{.Values.config.dmaapDrDb.mariadbServiceName}}:{{.Values.config.dmaapDrDb.mariadbServicePort}}/{{.Values.mariadb.config.mysqlDatabase}}
+org.onap.dmaap.datarouter.db.login    = ${DB_USERNAME}
+org.onap.dmaap.datarouter.db.password = ${DB_PASSWORD}
 
 # PROV - DEFAULT ENABLED TLS PROTOCOLS
 org.onap.dmaap.datarouter.provserver.https.include.protocols = TLSv1.1|TLSv1.2
@@ -55,4 +55,3 @@ org.onap.dmaap.datarouter.provserver.aaf.sub.type         = org.onap.dmaap-dr.su
 org.onap.dmaap.datarouter.provserver.aaf.instance         = legacy
 org.onap.dmaap.datarouter.provserver.aaf.action.publish   = publish
 org.onap.dmaap.datarouter.provserver.aaf.action.subscribe = subscribe
-
index d6257bb..104fcdc 100644 (file)
@@ -120,6 +120,11 @@ spec:
               port: {{ .Values.config.dmaapDrProv.internalPort }}
             initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
             periodSeconds: {{ .Values.readiness.periodSeconds }}
+          env:
+          - name: DB_USERNAME
+            {{- include "common.secret.envFromSecret" (dict "global" . "uid" "dmaap-dr-db-user-secret" "key" "login") | indent 12 }}
+          - name: DB_PASSWORD
+            {{- include "common.secret.envFromSecret" (dict "global" . "uid" "dmaap-dr-db-user-secret" "key" "password") | indent 12 }}
           volumeMounts:
           {{- if .Values.global.aafEnabled }}
           - mountPath: {{ .Values.persistence.aafCredsPath }}
diff --git a/kubernetes/dmaap/components/dmaap-dr-prov/templates/secret.yaml b/kubernetes/dmaap/components/dmaap-dr-prov/templates/secret.yaml
new file mode 100644 (file)
index 0000000..dee311c
--- /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.secret" . }}
index 4dcd7c3..6165568 100644 (file)
@@ -19,6 +19,17 @@ global:
   nodePortPrefix: 302
   loggingDirectory: /opt/app/datartr/logs
 
+#################################################################
+# Secrets metaconfig
+#################################################################
+secrets:
+  - uid: dmaap-dr-db-user-secret
+    name: '{{ include "common.release" . }}-dmaap-dr-db-user-secret'
+    type: basicAuth
+    externalSecret: '{{ tpl (default "" .Values.config.dmaapDrDb.userCredentialsExternalSecret) . }}'
+    login: '{{ .Values.config.dmaapDrDb.userName }}'
+    password: '{{ .Values.config.dmaapDrDb.userPassword }}'
+
 #################################################################
 # Application configuration defaults.
 #################################################################
@@ -88,6 +99,9 @@ config:
     mariadbServiceName: dmaap-dr-db-svc
     mariadbServicePort: 3306
     mariadbContName: dmaap-dr-db
+    userName: datarouter
+#    userPassword: password
+#    userCredentialsExternalSecret: some secret
 
 # mariadb-galera configuration
 mariadb:
@@ -95,9 +109,7 @@ mariadb:
   nameOverride: dmaap-dr-db
   replicaCount: 2
   config:
-    mariadbRootPassword: datarouter
-    userName: datarouter
-    userPassword: datarouter
+    userCredentialsExternalSecret: '{{ include "common.release" . }}-dmaap-dr-db-user-secret'
     mysqlDatabase: datarouter
   service:
     name: dmaap-dr-db-svc
@@ -136,4 +148,4 @@ resources:
     requests:
       cpu: 1000m
       memory: 2Gi
-  unlimited: {}
\ No newline at end of file
+  unlimited: {}
index 2b5a011..fd87adc 100755 (executable)
@@ -560,8 +560,7 @@ concurrent = true
 #table_prefix = sdnc
 
 # Base URL for SDN-C, up to and including the version. (string value)
-#server_url = https://controller:8443/restconf/
-server_url = https://sdncodl-conexus-e2e.ecomp.cci.att.com:8543/restconf/
+server_url = https://controller:8443/restconf/
 
 # Basic Authentication Username (string value)
 #username = <None>
@@ -577,7 +576,6 @@ password = Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
 # Retry Numbers for SDNC Rest Call (string value)
 #sdnc_retries = 3
 
-
 [service_controller]
 
 #
diff --git a/kubernetes/sdnc/charts/dmaap-listener/templates/secret.yaml b/kubernetes/sdnc/charts/dmaap-listener/templates/secret.yaml
new file mode 100644 (file)
index 0000000..dee311c
--- /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.secret" . }}
index d90da63..bec4d1c 100644 (file)
@@ -46,7 +46,7 @@ secrets:
     passwordPolicy: required
   - uid: odl-creds
     type: basicAuth
-    externalSecret: '{{ .Values.config.odlCredsExternalSecret }}'
+    externalSecret: '{{ tpl (default "" .Values.config.odlCredsExternalSecret) . }}'
     login: '{{ .Values.config.odlUser }}'
     password: '{{ .Values.config.odlPassword }}'
     passwordPolicy: required
index b0b3c81..4ee7c6f 100644 (file)
@@ -46,7 +46,7 @@ secrets:
     passwordPolicy: required
   - uid: rest-creds
     type: basicAuth
-    externalSecret: '{{ .Values.config.restCredsExternalSecret }}'
+    externalSecret: '{{ tpl (default "" .Values.config.restCredsExternalSecret) . }}'
     login: '{{ .Values.config.restUser }}'
     password: '{{ .Values.config.restPassword }}'
     passwordPolicy: required
index 8560ca1..e845e96 100644 (file)
   },
   "svclogicPropertiesDb01": "{{.Values.config.configDir}}/svclogic.properties.sdnctldb01",
   "databases": [
-    "{{.Values.config.mariadbGalera.serviceName}}.{{.Release.Namespace}}|sdnc-sdnctldb01.{{.Release.Namespace}}"
+    "{{include "common.mariadbService" $}}|sdnc-sdnctldb01.{{.Release.Namespace}}"
   ],
   "dbFabricServer": "localhost",
   "dbFabricPort": "32275",
   "dbFabricGroupId": "hagroup1",
-  "dbFabricUser": "admin",
-  "dbFabricPassword": "admin",
-  "dbFabricDB": "mysql",
-  "dbUser": "sdnctl",
-  "dbPassword": "{{.Values.config.dbSdnctlPassword}}",
-  "dbName": "sdnctl",
+  "dbFabricUser": "${DB_FABRIC_USER}",
+  "dbFabricPassword": "${DB_FABRIC_PASSWORD",
+  "dbFabricDB": "{{.Values.config.dbFabricDB}}",
+  "dbUser": "${SDNC_DB_USER}",
+  "dbPassword": "${SDNC_DB_PASSWORD}",
+  "dbName": "{{index $.Values "mariadb-galera" "config" "mysqlDatabase"}}",
   "odlProtocol": "http",
   "odlHost": "sdnc.{{.Release.Namespace}}",
   "odlConexusHost": "sdnc.{{.Release.Namespace}}",
   "odlPort": "8181",
   "odlConexusPort": "8181",
-  "odlUser": "admin",
-  "odlPasswd": "{{.Values.config.odlPassword}}",
+  "odlUser": "${ODL_USER}",
+  "odlPasswd": "${ODL_PASSWORD}",
   "ConexusNetwork_sslCert": "{{.Values.config.storesDir}}/org.onap.sdnc.p12",
-  "ConexusNetwork_sslKey": "{{.Values.config.keystorePwd}}",
+  "ConexusNetwork_sslKey": "${KEYSTORE_PASSWORD}",
   "AppNetwork_sslCert": "",
   "AppNetwork_sslKey": "",
   "hostnameList": [
index 7a5475e..beb514e 100644 (file)
@@ -1,7 +1,6 @@
 ###
 # ============LICENSE_START=======================================================
-# Copyright (C) 2018 ONAP Intellectual Property. All rights
-#                                              reserved.
+# Copyright (C) 2018 ONAP Intellectual Property. All rights reserved.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 ###
 org.onap.ccsdk.sli.dbtype=jdbc
 org.onap.ccsdk.sli.jdbc.hosts=sdnctldb01
-org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.config.mariadbGalera.serviceName}}.{{.Release.Namespace}}:{{.Values.config.mariadbGalera.internalPort}}/sdnctl
+org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{include "common.mariadbService" $}}:{{include "common.mariadbPort" $}}/{{index $.Values "mariadb-galera" "config" "mysqlDatabase"}}
 org.onap.ccsdk.sli.jdbc.driver=org.mariadb.jdbc.Driver
-org.onap.ccsdk.sli.jdbc.database=sdnctl
-org.onap.ccsdk.sli.jdbc.user=sdnctl
-org.onap.ccsdk.sli.jdbc.password={{.Values.config.dbSdnctlPassword}}
+org.onap.ccsdk.sli.jdbc.database={{index $.Values "mariadb-galera" "config" "mysqlDatabase"}}
+org.onap.ccsdk.sli.jdbc.user=${SDNC_DB_USER}
+org.onap.ccsdk.sli.jdbc.password=${SDNC_DB_PASSWORD}
 org.onap.ccsdk.sli.jdbc.connection.name=sdnctldb01
 org.onap.ccsdk.sli.jdbc.connection.timeout=50
 org.onap.ccsdk.sli.jdbc.request.timeout=100
index cc13a9d..a2570cd 100644 (file)
@@ -1,5 +1,5 @@
 org.openecomp.sdnctl.sli.dbtype = jdbc
-org.openecomp.sdnctl.sli.jdbc.url = jdbc:mysql://sdnc-sdnctldb01:3306/sdnctl
-org.openecomp.sdnctl.sli.jdbc.database = sdnctl
-org.openecomp.sdnctl.sli.jdbc.user = sdnctl
-org.openecomp.sdnctl.sli.jdbc.password = {{.Values.config.dbSdnctlPassword}}
\ No newline at end of file
+org.openecomp.sdnctl.sli.jdbc.url = jdbc:mysql://sdnc-sdnctldb01:3306/{{index $.Values "mariadb-galera" "config" "mysqlDatabase"}}
+org.openecomp.sdnctl.sli.jdbc.database = {{index $.Values "mariadb-galera" "config" "mysqlDatabase"}}
+org.openecomp.sdnctl.sli.jdbc.user = ${SDNC_DB_USER}
+org.openecomp.sdnctl.sli.jdbc.password = ${SDNC_DB_PASSWORD}
index c75c603..267bc20 100644 (file)
@@ -1,5 +1,5 @@
 org.openecomp.sdnctl.sli.dbtype = jdbc
-org.openecomp.sdnctl.sli.jdbc.url = jdbc:mysql://sdnc-sdnctldb02:3306/sdnctl
-org.openecomp.sdnctl.sli.jdbc.database = sdnctl
-org.openecomp.sdnctl.sli.jdbc.user = sdnctl
-org.openecomp.sdnctl.sli.jdbc.password = {{.Values.config.dbSdnctlPassword}}
\ No newline at end of file
+org.openecomp.sdnctl.sli.jdbc.url = jdbc:mysql://sdnc-sdnctldb02:3306/{{index $.Values "mariadb-galera" "config" "mysqlDatabase"}}
+org.openecomp.sdnctl.sli.jdbc.database = {{index $.Values "mariadb-galera" "config" "mysqlDatabase"}}
+org.openecomp.sdnctl.sli.jdbc.user = ${SDNC_DB_USER}
+org.openecomp.sdnctl.sli.jdbc.password = ${SDNC_DB_PASSWORD}
index db92b20..3a728ad 100644 (file)
@@ -31,11 +31,40 @@ spec:
         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: SDNC_DB_USER
+          {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
+        - name: SDNC_DB_PASSWORD
+          {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
+        - name: DB_FABRIC_USER
+          {{- include "common.secret.envFromSecret" (dict "global" . "uid" "fabric-db-creds" "key" "login") | indent 10 }}
+        - name: DB_FABRIC_PASSWORD
+          {{- include "common.secret.envFromSecret" (dict "global" . "uid" "fabric-db-creds" "key" "password") | indent 10 }}
+        - name: ODL_USER
+          {{- include "common.secret.envFromSecret" (dict "global" . "uid" "odl-creds" "key" "login") | indent 10 }}
+        - name: ODL_PASSWORD
+          {{- include "common.secret.envFromSecret" (dict "global" . "uid" "odl-creds" "key" "password") | indent 10 }}
+        - name: KEYSTORE_PASSWORD
+          {{- include "common.secret.envFromSecret" (dict "global" . "uid" "keystore-password" "key" "password") | indent 10 }}
+        volumeMounts:
+        - mountPath: /config-input
+          name: config-input
+        - mountPath: /config
+          name: properties
+        image: "{{ .Values.global.envsubstImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: {{ include "common.name" . }}-update-config
+
       - command:
         - /root/ready.py
         args:
         - --container-name
-        - {{ .Values.config.mariadbGalera.chartName }}
+        - {{ include "common.mariadbService" . }}
         - --container-name
         - {{ .Values.config.sdncChartName }}
         env:
@@ -71,10 +100,7 @@ spec:
             periodSeconds: {{ .Values.readiness.periodSeconds }}
           env:
             - name: MYSQL_ROOT_PASSWORD
-              valueFrom:
-                secretKeyRef:
-                  name: {{ template "common.fullname" . }}
-                  key: db-root-password
+              {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-root-password" "key" "password") | indent 14 }}
             - name: SDNC_CONFIG_DIR
               value: "{{ .Values.config.configDir }}"
           volumeMounts:
@@ -110,9 +136,12 @@ spec:
         - name: localtime
           hostPath:
             path: /etc/localtime
-        - name: properties
+        - name: config-input
           configMap:
             name: {{ include "common.fullname" . }}
             defaultMode: 0644
+        - name: properties
+          emptyDir:
+            medium: Memory
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"
index 239f734..dee311c 100644 (file)
@@ -1,13 +1,15 @@
-apiVersion: v1
-kind: Secret
-metadata:
-  name: {{ include "common.fullname" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.fullname" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ include "common.release" . }}
-    heritage: {{ .Release.Service }}
-type: Opaque
-data:
-  db-root-password: {{ .Values.config.dbRootPassword | b64enc | quote }}
+# 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.secret" . }}
index 7ff000e..94ea5d7 100644 (file)
@@ -21,6 +21,52 @@ global:
   readinessImage: readiness-check:2.0.2
   loggingRepository: docker.elastic.co
   loggingImage: beats/filebeat:5.5.0
+  # envsusbt
+  envsubstImage: dibi/envsubst
+
+  mariadbGalera:
+    #This flag allows SO to instantiate its own mariadb-galera cluster
+    #If shared instance is used, this chart assumes that DB already exists
+    localCluster: false
+    service: mariadb-galera
+    internalPort: 3306
+    nameOverride: mariadb-galera
+
+#################################################################
+# Secrets metaconfig
+#################################################################
+secrets:
+  - uid: db-root-password
+    type: password
+    externalSecret: '{{ .Values.global.mariadbGalera.localCluster | ternary (default (include "common.mariadb.secret.rootPassSecretName" (dict "dot" . "chartName" (index .Values "mariadb-galera" "nameOverride"))) (index .Values "mariadb-galera" "config" "mariadbRootPasswordExternalSecret")) (include "common.mariadb.secret.rootPassSecretName" (dict "dot" . "chartName" .Values.global.mariadbGalera.nameOverride)) }}'
+    password: '{{ (index .Values "mariadb-galera" "config" "mariadbRootPassword" }}'
+    passwordPolicy: required
+  - uid: db-secret
+    name: &dbSecretName '{{ include "common.release" . }}-sdnc-portal-db-secret'
+    type: basicAuth
+    # This is a nasty trick that allows you override this secret using external one
+    # with the same field that is used to pass this to subchart
+    externalSecret: '{{ ternary "" (tpl (default "" (index .Values "mariadb-galera" "config" "userCredentialsExternalSecret")) .) (hasSuffix "sdnc-portal-db-secret" (index .Values "mariadb-galera" "config" "userCredentialsExternalSecret"))}}'
+    login: '{{ index .Values "mariadb-galera" "config" "userName" }}'
+    password: '{{ index .Values "mariadb-galera" "config" "userPassword" }}'
+    passwordPolicy: required
+  - uid: odl-creds
+    type: basicAuth
+    externalSecret: '{{ tpl (default "" .Values.config.odlCredsExternalSecret) . }}'
+    login: '{{ .Values.config.odlUser }}'
+    password: '{{ .Values.config.odlPassword }}'
+    passwordPolicy: required
+  - uid: fabric-db-creds
+    type: basicAuth
+    externalSecret: '{{ tpl (default "" .Values.config.odlCredsExternalSecret) . }}'
+    login: '{{ .Values.config.dbFabricUser }}'
+    password: '{{ .Values.config.dbFabricPassword }}'
+    passwordPolicy: required
+  - uid: keystore-password
+    type: password
+    externalSecret: '{{ tpl (default "" .Values.config.KeyStorePwdExternalSecret) . }}'
+    password: '{{ .Values.config.keystorePwd }}'
+    passwordPolicy: required
 
 #################################################################
 # Application configuration defaults.
@@ -29,17 +75,34 @@ global:
 repository: nexus3.onap.org:10001
 image: onap/admportal-sdnc-image:1.7.6
 config:
-  dbRootPassword: secretpassword
-  dbSdnctlPassword: gamma
+  dbFabricDB: mysql
+  dbFabricUser: admin
+  dbFabricPassword: admin
+  # dbFabricDBCredsExternalSecret: some secret
   sdncChartName: sdnc
   configDir: /opt/onap/sdnc/data/properties
   storesDir: /opt/onap/sdnc/data/stores
+  odlUser: admin
   odlPassword: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
+  # odlCredsExternalSecret: some secret
   keystorePwd: ff^G9D]yf&r}Ktum@BJ0YB?N
-  mariadbGalera:
-    chartName: mariadb-galera
-    serviceName: mariadb-galera
+  # keystorePwdExternalSecret: some secret
+
+mariadb-galera:
+  config:
+    userCredentialsExternalSecret: *dbSecretName
+    userName: sdnctl
+    userPassword: gamma
+    mysqlDatabase: sdnctl
+  nameOverride: sdnc-portal-galera
+  service:
+    name: sdnc-portal-galera
+    portName: sdnc-portal-galera
     internalPort: 3306
+  replicaCount: 1
+  persistence:
+    enabled: true
+    mountSubPath: sdnc-portal/maria/data
 
 # default number of instances
 replicaCount: 0
index 03fbf52..9b7dcb0 100644 (file)
@@ -46,13 +46,13 @@ secrets:
     passwordPolicy: required
   - uid: odl-creds
     type: basicAuth
-    externalSecret: '{{ .Values.config.odlCredsExternalSecret }}'
+    externalSecret: '{{ tpl (default "" .Values.config.odlCredsExternalSecret) . }}'
     login: '{{ .Values.config.odlUser }}'
     password: '{{ .Values.config.odlPassword }}'
     passwordPolicy: required
   - uid: ueb-creds
     type: basicAuth
-    externalSecret: '{{ .Values.config.odlCredsExternalSecret }}'
+    externalSecret: '{{ tpl (default "" .Values.config.odlCredsExternalSecret) . }}'
     login: '{{ .Values.config.uebUser }}'
     password: '{{ .Values.config.uebPassword }}'
     passwordPolicy: required
index e8d0595..fb8f1a0 100644 (file)
@@ -39,7 +39,7 @@ subChartsOnly:
 
 # application image
 repository: nexus3.onap.org:10001
-image: onap/vid:6.0.2
+image: onap/vid:6.0.3
 pullPolicy: Always
 
 # mariadb image for initializing