Merge "OOM missing CDS BP app properties for HealthCheck."
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Tue, 10 Dec 2019 15:43:08 +0000 (15:43 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 10 Dec 2019 15:43:08 +0000 (15:43 +0000)
225 files changed:
.gitignore
docs/oom_quickstart_guide.rst
docs/oom_user_guide.rst
kubernetes/aai
kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh
kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/appc.properties
kubernetes/appc/values.yaml
kubernetes/cds/charts/cds-ui/templates/deployment.yaml
kubernetes/cds/charts/cds-ui/values.yaml
kubernetes/clamp/templates/ingress.yaml [new file with mode: 0644]
kubernetes/clamp/values.yaml
kubernetes/cli/templates/ingress.yaml [new file with mode: 0644]
kubernetes/cli/values.yaml
kubernetes/common/common/templates/_createPassword.tpl [new file with mode: 0644]
kubernetes/common/common/templates/_ingress.tpl
kubernetes/common/common/templates/_mariadb.tpl [new file with mode: 0644]
kubernetes/common/common/templates/_name.tpl
kubernetes/common/common/templates/_storageClass.tpl [new file with mode: 0644]
kubernetes/common/mariadb-galera/.helmignore
kubernetes/common/mariadb-galera/templates/configmap.yaml
kubernetes/common/mariadb-galera/templates/pv.yaml
kubernetes/common/mariadb-galera/templates/statefulset.yaml
kubernetes/common/mariadb-galera/tests/pv_test.yaml [new file with mode: 0644]
kubernetes/common/mariadb-galera/tests/storage_class_test.yaml [new file with mode: 0644]
kubernetes/common/mariadb-galera/tests/values/persistence.yaml [new file with mode: 0644]
kubernetes/common/mariadb-galera/values.yaml
kubernetes/common/mariadb-init/.helmignore [new file with mode: 0644]
kubernetes/common/mariadb-init/Chart.yaml [moved from kubernetes/multicloud/charts/multicloud-lenovo/Chart.yaml with 84% similarity]
kubernetes/common/mariadb-init/requirements.yaml [new file with mode: 0644]
kubernetes/common/mariadb-init/resources/config/db_init.sh [new file with mode: 0755]
kubernetes/common/mariadb-init/templates/_configmap.tpl [new file with mode: 0644]
kubernetes/common/mariadb-init/templates/_mariadb.tpl [new file with mode: 0644]
kubernetes/common/mariadb-init/templates/configmap.yaml [moved from kubernetes/policy/charts/mariadb/templates/secrets.yaml with 76% similarity]
kubernetes/common/mariadb-init/templates/job.yaml [new file with mode: 0644]
kubernetes/common/mariadb-init/templates/secret.yaml [new file with mode: 0644]
kubernetes/common/mariadb-init/tests/configmap_test.yaml [new file with mode: 0644]
kubernetes/common/mariadb-init/tests/job_test.yaml [new file with mode: 0644]
kubernetes/common/mariadb-init/tests/secret_test.yaml [new file with mode: 0644]
kubernetes/common/mariadb-init/values.yaml [new file with mode: 0644]
kubernetes/consul/templates/ingress.yaml [new file with mode: 0644]
kubernetes/consul/values.yaml
kubernetes/contrib/ingress-nginx-post-inst/nginx_ingress_cluster_config.yaml [new file with mode: 0644]
kubernetes/dcaegen2/Chart.yaml
kubernetes/dcaegen2/Makefile
kubernetes/dcaegen2/components/dcae-bootstrap/.helmignore [moved from kubernetes/dcaegen2/charts/dcae-bootstrap/.helmignore with 100% similarity]
kubernetes/dcaegen2/components/dcae-bootstrap/Chart.yaml [moved from kubernetes/dcaegen2/charts/dcae-bootstrap/Chart.yaml with 98% similarity]
kubernetes/dcaegen2/components/dcae-bootstrap/requirements.yaml [moved from kubernetes/dcaegen2/charts/dcae-bootstrap/requirements.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-bootstrap/resources/certs/cacert.pem [moved from kubernetes/dcaegen2/charts/dcae-bootstrap/resources/certs/cacert.pem with 100% similarity]
kubernetes/dcaegen2/components/dcae-bootstrap/resources/config/dmaap-plugin.json [moved from kubernetes/dcaegen2/charts/dcae-bootstrap/resources/config/dmaap-plugin.json with 100% similarity]
kubernetes/dcaegen2/components/dcae-bootstrap/resources/config/k8s-plugin.json [moved from kubernetes/dcaegen2/charts/dcae-bootstrap/resources/config/k8s-plugin.json with 100% similarity]
kubernetes/dcaegen2/components/dcae-bootstrap/resources/inputs/k8s-dashboard-inputs.yaml [moved from kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-dashboard-inputs.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-bootstrap/resources/inputs/k8s-datafile-collector-inputs.yaml [moved from kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-datafile-collector-inputs.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-bootstrap/resources/inputs/k8s-holmes_engine-inputs.yaml [moved from kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-holmes_engine-inputs.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-bootstrap/resources/inputs/k8s-holmes_rules-inputs.yaml [moved from kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-holmes_rules-inputs.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-bootstrap/resources/inputs/k8s-hv_ves-inputs.yaml [moved from kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-hv_ves-inputs.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-bootstrap/resources/inputs/k8s-pgaas-initdb-inputs.yaml [moved from kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-pgaas-initdb-inputs.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-bootstrap/resources/inputs/k8s-prh-inputs.yaml [moved from kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-prh-inputs.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-bootstrap/resources/inputs/k8s-snmptrap-inputs.yaml [moved from kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-snmptrap-inputs.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-bootstrap/resources/inputs/k8s-tca-inputs.yaml [moved from kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-tca-inputs.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-bootstrap/resources/inputs/k8s-ves-inputs.yaml [moved from kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-ves-inputs.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-bootstrap/templates/configmap.yaml [moved from kubernetes/dcaegen2/charts/dcae-bootstrap/templates/configmap.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-bootstrap/templates/deployment.yaml [moved from kubernetes/dcaegen2/charts/dcae-bootstrap/templates/deployment.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-bootstrap/templates/secret.yaml [moved from kubernetes/dcaegen2/charts/dcae-bootstrap/templates/secret.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-bootstrap/values.yaml [moved from kubernetes/dcaegen2/charts/dcae-bootstrap/values.yaml with 98% similarity]
kubernetes/dcaegen2/components/dcae-cloudify-manager/.helmignore [moved from kubernetes/dcaegen2/charts/dcae-cloudify-manager/.helmignore with 100% similarity]
kubernetes/dcaegen2/components/dcae-cloudify-manager/Chart.yaml [moved from kubernetes/dcaegen2/charts/dcae-cloudify-manager/Chart.yaml with 98% similarity]
kubernetes/dcaegen2/components/dcae-cloudify-manager/README.md [moved from kubernetes/dcaegen2/charts/dcae-cloudify-manager/README.md with 100% similarity]
kubernetes/dcaegen2/components/dcae-cloudify-manager/requirements.yaml [moved from kubernetes/dcaegen2/charts/dcae-cloudify-manager/requirements.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-cloudify-manager/resources/config/config.txt [moved from kubernetes/dcaegen2/charts/dcae-cloudify-manager/resources/config/config.txt with 100% similarity]
kubernetes/dcaegen2/components/dcae-cloudify-manager/resources/config/log/filebeat.yml [moved from kubernetes/dcaegen2/charts/dcae-cloudify-manager/resources/config/log/filebeat.yml with 100% similarity]
kubernetes/dcaegen2/components/dcae-cloudify-manager/templates/configmap.yaml [moved from kubernetes/dcaegen2/charts/dcae-cloudify-manager/templates/configmap.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-cloudify-manager/templates/deployment.yaml [moved from kubernetes/dcaegen2/charts/dcae-cloudify-manager/templates/deployment.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-cloudify-manager/templates/job.yaml [moved from kubernetes/dcaegen2/charts/dcae-cloudify-manager/templates/job.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-cloudify-manager/templates/namespace.yaml [moved from kubernetes/dcaegen2/charts/dcae-cloudify-manager/templates/namespace.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-cloudify-manager/templates/pv.yaml [moved from kubernetes/dcaegen2/charts/dcae-cloudify-manager/templates/pv.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-cloudify-manager/templates/pvc.yaml [moved from kubernetes/dcaegen2/charts/dcae-cloudify-manager/templates/pvc.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-cloudify-manager/templates/secret.yaml [moved from kubernetes/dcaegen2/charts/dcae-cloudify-manager/templates/secret.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-cloudify-manager/templates/service.yaml [moved from kubernetes/dcaegen2/charts/dcae-cloudify-manager/templates/service.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-cloudify-manager/values.yaml [moved from kubernetes/dcaegen2/charts/dcae-cloudify-manager/values.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-config-binding-service/Chart.yaml [moved from kubernetes/dcaegen2/charts/dcae-config-binding-service/Chart.yaml with 98% similarity]
kubernetes/dcaegen2/components/dcae-config-binding-service/requirements.yaml [moved from kubernetes/dcaegen2/charts/dcae-config-binding-service/requirements.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-config-binding-service/resources/config/log/filebeat/filebeat.yml [moved from kubernetes/dcaegen2/charts/dcae-config-binding-service/resources/config/log/filebeat/filebeat.yml with 100% similarity]
kubernetes/dcaegen2/components/dcae-config-binding-service/templates/configmap.yaml [moved from kubernetes/dcaegen2/charts/dcae-config-binding-service/templates/configmap.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-config-binding-service/templates/deployment.yaml [moved from kubernetes/dcaegen2/charts/dcae-config-binding-service/templates/deployment.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-config-binding-service/templates/service.yaml [moved from kubernetes/dcaegen2/charts/dcae-config-binding-service/templates/service.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-config-binding-service/values.yaml [moved from kubernetes/dcaegen2/charts/dcae-config-binding-service/values.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-dashboard/.helmignore [moved from kubernetes/dcaegen2/charts/dcae-dashboard/.helmignore with 100% similarity]
kubernetes/dcaegen2/components/dcae-dashboard/Chart.yaml [moved from kubernetes/dcaegen2/charts/dcae-dashboard/Chart.yaml with 84% similarity]
kubernetes/dcaegen2/components/dcae-dashboard/requirements.yaml [moved from kubernetes/dcaegen2/charts/dcae-dashboard/requirements.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-dashboard/resources/log/filebeat.yml [moved from kubernetes/dcaegen2/charts/dcae-dashboard/resources/log/filebeat.yml with 100% similarity]
kubernetes/dcaegen2/components/dcae-dashboard/templates/configmap.yaml [moved from kubernetes/dcaegen2/charts/dcae-dashboard/templates/configmap.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-dashboard/templates/deployment.yaml [moved from kubernetes/dcaegen2/charts/dcae-dashboard/templates/deployment.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-dashboard/templates/service.yaml [moved from kubernetes/dcaegen2/charts/dcae-dashboard/templates/service.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-dashboard/values.yaml [moved from kubernetes/dcaegen2/charts/dcae-dashboard/values.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-deployment-handler/.helmignore [moved from kubernetes/dcaegen2/charts/dcae-deployment-handler/.helmignore with 100% similarity]
kubernetes/dcaegen2/components/dcae-deployment-handler/Chart.yaml [moved from kubernetes/dcaegen2/charts/dcae-deployment-handler/Chart.yaml with 98% similarity]
kubernetes/dcaegen2/components/dcae-deployment-handler/requirements.yaml [moved from kubernetes/dcaegen2/charts/dcae-deployment-handler/requirements.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-deployment-handler/resources/config/config.json [moved from kubernetes/dcaegen2/charts/dcae-deployment-handler/resources/config/config.json with 100% similarity]
kubernetes/dcaegen2/components/dcae-deployment-handler/resources/log/filebeat.yml [moved from kubernetes/dcaegen2/charts/dcae-deployment-handler/resources/log/filebeat.yml with 100% similarity]
kubernetes/dcaegen2/components/dcae-deployment-handler/templates/configmap.yaml [moved from kubernetes/dcaegen2/charts/dcae-deployment-handler/templates/configmap.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-deployment-handler/templates/deployment.yaml [moved from kubernetes/dcaegen2/charts/dcae-deployment-handler/templates/deployment.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-deployment-handler/templates/service.yaml [moved from kubernetes/dcaegen2/charts/dcae-deployment-handler/templates/service.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-deployment-handler/values.yaml [moved from kubernetes/dcaegen2/charts/dcae-deployment-handler/values.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-healthcheck/Chart.yaml [moved from kubernetes/dcaegen2/charts/dcae-healthcheck/Chart.yaml with 98% similarity]
kubernetes/dcaegen2/components/dcae-healthcheck/requirements.yaml [moved from kubernetes/dcaegen2/charts/dcae-healthcheck/requirements.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-healthcheck/templates/deployment.yaml [moved from kubernetes/dcaegen2/charts/dcae-healthcheck/templates/deployment.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-healthcheck/templates/service.yaml [moved from kubernetes/dcaegen2/charts/dcae-healthcheck/templates/service.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-healthcheck/values.yaml [moved from kubernetes/dcaegen2/charts/dcae-healthcheck/values.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-inventory-api/Chart.yaml [moved from kubernetes/dcaegen2/charts/dcae-servicechange-handler/charts/dcae-inventory-api/Chart.yaml with 98% similarity]
kubernetes/dcaegen2/components/dcae-inventory-api/requirements.yaml [moved from kubernetes/dcaegen2/charts/dcae-servicechange-handler/charts/dcae-inventory-api/requirements.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-inventory-api/resources/config/config.json [moved from kubernetes/dcaegen2/charts/dcae-servicechange-handler/charts/dcae-inventory-api/resources/config/config.json with 100% similarity]
kubernetes/dcaegen2/components/dcae-inventory-api/templates/configmap.yaml [moved from kubernetes/dcaegen2/charts/dcae-servicechange-handler/charts/dcae-inventory-api/templates/configmap.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-inventory-api/templates/deployment.yaml [moved from kubernetes/dcaegen2/charts/dcae-servicechange-handler/charts/dcae-inventory-api/templates/deployment.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-inventory-api/templates/service.yaml [moved from kubernetes/dcaegen2/charts/dcae-policy-handler/templates/service.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-inventory-api/values.yaml [moved from kubernetes/dcaegen2/charts/dcae-servicechange-handler/charts/dcae-inventory-api/values.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-policy-handler/.helmignore [moved from kubernetes/dcaegen2/charts/dcae-policy-handler/.helmignore with 100% similarity]
kubernetes/dcaegen2/components/dcae-policy-handler/Chart.yaml [moved from kubernetes/dcaegen2/charts/dcae-policy-handler/Chart.yaml with 98% similarity]
kubernetes/dcaegen2/components/dcae-policy-handler/requirements.yaml [moved from kubernetes/dcaegen2/charts/dcae-policy-handler/requirements.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-policy-handler/resources/config/config.json [moved from kubernetes/dcaegen2/charts/dcae-policy-handler/resources/config/config.json with 100% similarity]
kubernetes/dcaegen2/components/dcae-policy-handler/resources/log/filebeat.yml [moved from kubernetes/dcaegen2/charts/dcae-policy-handler/resources/log/filebeat.yml with 100% similarity]
kubernetes/dcaegen2/components/dcae-policy-handler/templates/configmap.yaml [moved from kubernetes/dcaegen2/charts/dcae-policy-handler/templates/configmap.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-policy-handler/templates/deployment.yaml [moved from kubernetes/dcaegen2/charts/dcae-policy-handler/templates/deployment.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-policy-handler/templates/service.yaml [moved from kubernetes/dcaegen2/charts/dcae-servicechange-handler/charts/dcae-inventory-api/templates/service.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-policy-handler/values.yaml [moved from kubernetes/dcaegen2/charts/dcae-policy-handler/values.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-redis/.helmignore [moved from kubernetes/dcaegen2/charts/dcae-redis/.helmignore with 100% similarity]
kubernetes/dcaegen2/components/dcae-redis/Chart.yaml [moved from kubernetes/dcaegen2/charts/dcae-redis/Chart.yaml with 97% similarity]
kubernetes/dcaegen2/components/dcae-redis/requirements.yaml [moved from kubernetes/dcaegen2/charts/dcae-redis/requirements.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-redis/resources/redis/scripts/redis-cluster-config.sh [moved from kubernetes/dcaegen2/charts/dcae-redis/resources/redis/scripts/redis-cluster-config.sh with 100% similarity]
kubernetes/dcaegen2/components/dcae-redis/templates/NOTES.txt [moved from kubernetes/dcaegen2/charts/dcae-redis/templates/NOTES.txt with 100% similarity]
kubernetes/dcaegen2/components/dcae-redis/templates/configmap.yaml [moved from kubernetes/dcaegen2/charts/dcae-redis/templates/configmap.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-redis/templates/ingress.yaml [new file with mode: 0644]
kubernetes/dcaegen2/components/dcae-redis/templates/pv.yaml [moved from kubernetes/dcaegen2/charts/dcae-redis/templates/pv.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-redis/templates/service.yaml [moved from kubernetes/dcaegen2/charts/dcae-redis/templates/service.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-redis/templates/statefulset.yaml [moved from kubernetes/dcaegen2/charts/dcae-redis/templates/statefulset.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-redis/values.yaml [moved from kubernetes/dcaegen2/charts/dcae-redis/values.yaml with 94% similarity]
kubernetes/dcaegen2/components/dcae-servicechange-handler/Chart.yaml [moved from kubernetes/dcaegen2/charts/dcae-servicechange-handler/Chart.yaml with 98% similarity]
kubernetes/dcaegen2/components/dcae-servicechange-handler/requirements.yaml [moved from kubernetes/dcaegen2/charts/dcae-servicechange-handler/requirements.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-servicechange-handler/resources/config/config.json [moved from kubernetes/dcaegen2/charts/dcae-servicechange-handler/resources/config/config.json with 100% similarity]
kubernetes/dcaegen2/components/dcae-servicechange-handler/templates/configmap.yaml [moved from kubernetes/dcaegen2/charts/dcae-servicechange-handler/templates/configmap.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-servicechange-handler/templates/deployment.yaml [moved from kubernetes/dcaegen2/charts/dcae-servicechange-handler/templates/deployment.yaml with 100% similarity]
kubernetes/dcaegen2/components/dcae-servicechange-handler/values.yaml [moved from kubernetes/dcaegen2/charts/dcae-servicechange-handler/values.yaml with 100% similarity]
kubernetes/dcaegen2/requirements.yaml
kubernetes/log/charts/log-elasticsearch/templates/ingress.yaml [new file with mode: 0644]
kubernetes/log/charts/log-elasticsearch/values.yaml
kubernetes/log/charts/log-kibana/templates/ingress.yaml [new file with mode: 0644]
kubernetes/log/charts/log-kibana/values.yaml
kubernetes/log/charts/log-logstash/templates/ingress.yaml [new file with mode: 0644]
kubernetes/log/charts/log-logstash/values.yaml
kubernetes/msb/charts/msb-consul/templates/ingress.yaml [new file with mode: 0644]
kubernetes/msb/charts/msb-consul/values.yaml
kubernetes/msb/charts/msb-discovery/templates/ingress.yaml [new file with mode: 0644]
kubernetes/msb/charts/msb-discovery/values.yaml
kubernetes/msb/charts/msb-eag/templates/ingress.yaml [new file with mode: 0644]
kubernetes/msb/charts/msb-eag/templates/service.yaml
kubernetes/msb/charts/msb-eag/values.yaml
kubernetes/msb/charts/msb-iag/templates/ingress.yaml [new file with mode: 0644]
kubernetes/msb/charts/msb-iag/templates/service.yaml
kubernetes/msb/charts/msb-iag/values.yaml
kubernetes/multicloud/charts/multicloud-lenovo/.helmignore [deleted file]
kubernetes/multicloud/charts/multicloud-lenovo/resources/config/log/log.yml [deleted file]
kubernetes/multicloud/charts/multicloud-lenovo/templates/NOTES.txt [deleted file]
kubernetes/multicloud/charts/multicloud-lenovo/templates/configmap.yaml [deleted file]
kubernetes/multicloud/charts/multicloud-lenovo/templates/deployment.yaml [deleted file]
kubernetes/multicloud/charts/multicloud-lenovo/templates/service.yaml [deleted file]
kubernetes/multicloud/charts/multicloud-lenovo/values.yaml [deleted file]
kubernetes/nbi/requirements.yaml
kubernetes/nbi/templates/deployment.yaml
kubernetes/nbi/tests/deployment_test.yaml [new file with mode: 0644]
kubernetes/nbi/values.yaml
kubernetes/onap/requirements.yaml
kubernetes/onap/values.yaml
kubernetes/policy/charts/brmsgw/values.yaml
kubernetes/policy/charts/drools/charts/nexus/values.yaml
kubernetes/policy/charts/drools/resources/configmaps/base.conf
kubernetes/policy/charts/drools/templates/statefulset.yaml
kubernetes/policy/charts/drools/values.yaml
kubernetes/policy/charts/mariadb/Chart.yaml [deleted file]
kubernetes/policy/charts/mariadb/requirements.yaml [deleted file]
kubernetes/policy/charts/mariadb/templates/NOTES.txt [deleted file]
kubernetes/policy/charts/mariadb/templates/configmap.yaml [deleted file]
kubernetes/policy/charts/mariadb/templates/deployment.yaml [deleted file]
kubernetes/policy/charts/mariadb/templates/pv.yaml [deleted file]
kubernetes/policy/charts/mariadb/templates/pvc.yaml [deleted file]
kubernetes/policy/charts/mariadb/templates/service.yaml [deleted file]
kubernetes/policy/charts/mariadb/values.yaml [deleted file]
kubernetes/policy/charts/pdp/values.yaml
kubernetes/policy/charts/policy-api/resources/config/config.json
kubernetes/policy/charts/policy-api/templates/deployment.yaml
kubernetes/policy/charts/policy-common/resources/config/pe/base.conf
kubernetes/policy/charts/policy-common/resources/config/scripts/do-start.sh
kubernetes/policy/charts/policy-common/values.yaml
kubernetes/policy/charts/policy-pap/resources/config/config.json
kubernetes/policy/charts/policy-pap/templates/deployment.yaml
kubernetes/policy/charts/policy-xacml-pdp/resources/config/config.json
kubernetes/policy/charts/policy-xacml-pdp/resources/config/xacml.properties
kubernetes/policy/charts/policy-xacml-pdp/templates/deployment.yaml
kubernetes/policy/requirements.yaml
kubernetes/policy/resources/config/db.sh [moved from kubernetes/policy/charts/mariadb/resources/config/db.sh with 93% similarity]
kubernetes/policy/templates/configmap.yaml
kubernetes/policy/templates/deployment.yaml
kubernetes/policy/templates/job.yaml [new file with mode: 0644]
kubernetes/policy/templates/secrets.yaml [moved from kubernetes/nbi/templates/secrets.yaml with 92% similarity]
kubernetes/policy/values.yaml
kubernetes/robot
kubernetes/sdnc/charts/dmaap-listener/values.yaml
kubernetes/sdnc/charts/sdnc-ansible-server/values.yaml
kubernetes/sdnc/charts/sdnc-portal/values.yaml
kubernetes/sdnc/charts/ueb-listener/values.yaml
kubernetes/sdnc/values.yaml
kubernetes/vid/charts/vid-mariadb-galera/Chart.yaml [deleted file]
kubernetes/vid/charts/vid-mariadb-galera/templates/NOTES.txt [deleted file]
kubernetes/vid/charts/vid-mariadb-galera/templates/configmap.yaml [deleted file]
kubernetes/vid/charts/vid-mariadb-galera/templates/pv.yaml [deleted file]
kubernetes/vid/charts/vid-mariadb-galera/templates/pvc.yaml [deleted file]
kubernetes/vid/charts/vid-mariadb-galera/templates/secrets.yaml [deleted file]
kubernetes/vid/charts/vid-mariadb-galera/templates/service.yaml [deleted file]
kubernetes/vid/charts/vid-mariadb-galera/templates/statefulset.yaml [deleted file]
kubernetes/vid/charts/vid-mariadb-galera/values.yaml [deleted file]
kubernetes/vid/requirements.yaml
kubernetes/vid/templates/deployment.yaml
kubernetes/vid/templates/job.yaml
kubernetes/vid/templates/secrets.yaml
kubernetes/vid/values.yaml
kubernetes/vnfsdk/templates/ingress.yaml [new file with mode: 0644]
kubernetes/vnfsdk/values.yaml

index 96e76c1..fcf3cdd 100644 (file)
@@ -1,3 +1,6 @@
+# Unit tests
+__snapshot__
+
 # Application
 kubernetes/config/onap-parameters.yaml
 kubernetes/dist/*
@@ -22,4 +25,3 @@ requirements.lock
 
 # Mac OS
 *DS_Store*
-
index 2399dc3..2607805 100644 (file)
@@ -29,25 +29,25 @@ where <BRANCH> can be an offical release tag, such as
   > sudo cp -R ~/oom/kubernetes/helm/plugins/ ~/.helm
 
 
-**Step 3.** Customize the helm charts like oom/kubernetes/onap/values.yaml or an override
-file like onap-all.yaml, onap-vfw.yaml or openstack.yaml file to suit your deployment with items like the
-OpenStack tenant information.
+**Step 3.** Customize the helm charts like `oom/kubernetes/onap/values.yaml` or an override
+file like `onap-all.yaml`, `onap-vfw.yaml` or `openstack.yaml` file to suit your deployment
+with items like the OpenStack tenant information.
 
 .. note::
-  Standard and example override files (e.g. onap-all.yaml, openstack.yaml) can be found in
-  the oom/kubernetes/onap/resources/overrides/ directory.
+  Standard and example override files (e.g. `onap-all.yaml`, `openstack.yaml`) can be found in
+  the `oom/kubernetes/onap/resources/overrides/` directory.
 
 
  a. You may want to selectively enable or disable ONAP components by changing
-    the `enabled: true/false` flags.
+    the ``enabled: true/false`` flags.
 
 
- b. Encyrpt the OpenStack password using the shell tool for robot and put it in
-    the robot helm charts or robot section of openstack.yaml
+ b. Encrypt the OpenStack password using the shell tool for robot and put it in
+    the robot helm charts or robot section of `openstack.yaml`
 
 
  c. Encrypt the OpenStack password using the java based script for SO helm charts
-    or SO section of openstack.yaml.
+    or SO section of `openstack.yaml`.
 
 
  d. Update the OpenStack parameters that will be used by robot, SO and APPC helm
@@ -60,7 +60,7 @@ a. Enabling/Disabling Components:
 Here is an example of the nominal entries that need to be provided.
 We have different values file available for different contexts.
 
-.. literalinclude:: onap-values.yaml
+.. literalinclude:: ../kubernetes/onap/values.yaml
    :language: yaml
 
 
@@ -69,11 +69,10 @@ The ROBOT encrypted Password uses the same encryption.key as SO but an
 openssl algorithm that works with the python based Robot Framework.
 
 .. note::
-  To generate ROBOT openStackEncryptedPasswordHere :
+  To generate ROBOT ``openStackEncryptedPasswordHere``::
 
-  ``cd so/resources/config/mso/``
-
-  ``/oom/kubernetes/so/resources/config/mso# echo -n "<openstack tenant password>" | openssl aes-128-ecb -e -K `cat encryption.key` -nosalt | xxd -c 256 -p``
+    cd so/resources/config/mso/
+    /oom/kubernetes/so/resources/config/mso# echo -n "<openstack tenant password>" | openssl aes-128-ecb -e -K `cat encryption.key` -nosalt | xxd -c 256 -p``
 
 c. Generating SO Encrypted Password:
 The SO Encrypted Password uses a java based encryption utility since the
@@ -81,23 +80,21 @@ Java encryption library is not easy to integrate with openssl/python that
 ROBOT uses in Dublin.
 
 .. note::
-  To generate SO openStackEncryptedPasswordHere and openStackSoEncryptedPassword:
-
-  SO_ENCRYPTION_KEY=`cat ~/oom/kubernetes/so/resources/config/mso/encryption.key`
-
-  OS_PASSWORD=XXXX_OS_CLEARTESTPASSWORD_XXXX
-
-  git clone http://gerrit.onap.org/r/integration
+  To generate SO ``openStackEncryptedPasswordHere`` and ``openStackSoEncryptedPassword``
+  ensure `default-jdk` is installed::
 
-  cd integration/deployment/heat/onap-rke/scripts
+    apt-get update; apt-get install default-jdk
 
+  Then execute::
 
-  javac Crypto.java
+    SO_ENCRYPTION_KEY=`cat ~/oom/kubernetes/so/resources/config/mso/encryption.key`
+    OS_PASSWORD=XXXX_OS_CLEARTESTPASSWORD_XXXX
 
-  [ if javac is not installed 'apt-get update ; apt-get install default-jdk' ]
-
-  java Crypto "$OS_PASSWORD" "$SO_ENCRYPTION_KEY"
+    git clone http://gerrit.onap.org/r/integration
+    cd integration/deployment/heat/onap-rke/scripts
 
+    javac Crypto.java
+    java Crypto "$OS_PASSWORD" "$SO_ENCRYPTION_KEY"
 
 d. Update the OpenStack parameters:
 
@@ -106,35 +103,34 @@ available in the environment. To get the most value out of these templates and t
 automation that can help confirm the setup is correct, please observe the following 
 constraints.
 
-openStackPublicNetId: 
-
-This network should allow heat templates to add interfaces. 
-This need not be an external network, floating IPs can be assigned to the ports on 
-the VMs that are created by the heat template but its important that neutron allow 
-ports to be created on them.
-
-openStackPrivateNetCidr: "10.0.0.0/16"
+``openStackPublicNetId:``
+  This network should allow heat templates to add interfaces.
+  This need not be an external network, floating IPs can be assigned to the ports on
+  the VMs that are created by the heat template but its important that neutron allow
+  ports to be created on them.
 
-This ip address block is used to assign OA&M addresses on VNFs to allow ONAP connectivity.
-The demonstration heat templates assume that 10.0 prefix can be used by the VNFs and the 
-demonstration ip addressing plan embodied in the preload template prevent conflicts when 
-instantiating the various VNFs. If you need to change this, you will need to modify the preload 
-data in the robot helm chart like integration_preload_parametes.py and the demo/heat/preload_data 
-in the robot container. The size of the CIDR should be sufficient for ONAP and the VMs you expect 
-to create.
+``openStackPrivateNetCidr: "10.0.0.0/16"``
+  This ip address block is used to assign OA&M addresses on VNFs to allow ONAP connectivity.
+  The demonstration heat templates assume that 10.0 prefix can be used by the VNFs and the
+  demonstration ip addressing plan embodied in the preload template prevent conflicts when
+  instantiating the various VNFs. If you need to change this, you will need to modify the preload
+  data in the robot helm chart like integration_preload_parametes.py and the demo/heat/preload_data
+  in the robot container. The size of the CIDR should be sufficient for ONAP and the VMs you expect
+  to create.
 
-openStackOamNetworkCidrPrefix: "10.0"
-
-This ip prefix mush match the openStackPrivateNetCidr and is a helper variable to some of the
-robot scripts for demonstration. A production deployment need not worry about this
-setting but for the demonstration VNFs the ip asssignment strategy assumes 10.0 ip prefix.
+``openStackOamNetworkCidrPrefix: "10.0"``
+  This ip prefix mush match the openStackPrivateNetCidr and is a helper variable to some of the
+  robot scripts for demonstration. A production deployment need not worry about this
+  setting but for the demonstration VNFs the ip asssignment strategy assumes 10.0 ip prefix.
 
 
 Example Keystone v2.0 
+
 .. literalinclude:: example-integration-override.yaml
    :language: yaml
 
 Example Keystone v3  (required for Rocky and later releases)
+
 .. literalinclude:: example-integration-override-v3.yaml
    :language: yaml
 
@@ -166,13 +162,13 @@ follows::
 .. literalinclude:: helm-search.txt
 
 .. note::
-  The setup of the Helm repository is a one time activity. If you make changes to your deployment charts or values be sure to use `make` to update your local Helm repository.
+  The setup of the Helm repository is a one time activity. If you make changes to your deployment charts or values be sure to use ``make`` to update your local Helm repository.
 
 **Step 8.** Once the repo is setup, installation of ONAP can be done with a
 single command
 
 .. note::
-  The --timeout 900 is currently required in Dublin to address long running initialization tasks
+  The ``--timeout 900`` is currently required in Dublin to address long running initialization tasks
   for DMaaP and SO. Without this timeout value both applications may fail to deploy.
 
 To deploy all ONAP applications use this command::
@@ -182,18 +178,15 @@ To deploy all ONAP applications use this command::
 
 All override files may be customized (or replaced by other overrides) as per needs.
 
-onap-all.yaml
-
+`onap-all.yaml`
   Enables the modules in the ONAP deployment. As ONAP is very modular, it is possible to customize ONAP and disable some components through this configuration file.
 
-environment.yaml
-
+`environment.yaml`
   Includes configuration values specific to the deployment environment.
 
   Example: adapt readiness and liveness timers to the level of performance of your infrastructure
 
-openstack.yaml
-
+`openstack.yaml`
   Includes all the Openstack related information for the default target tenant you want to use to deploy VNFs from ONAP and/or additional parameters for the embedded tests.
 
 **Step 9.** Verify ONAP installation
@@ -205,12 +198,12 @@ Use the following to monitor your deployment and determine when ONAP is ready fo
 .. note::
   While all pods may be in a Running state, it is not a guarantee that all components are running fine.
 
-  Launch the healthcheck tests using Robot to verify that the components are healthy.
+  Launch the healthcheck tests using Robot to verify that the components are healthy::
 
-  > ~/oom/kubernetes/robot/ete-k8s.sh onap health
+    > ~/oom/kubernetes/robot/ete-k8s.sh onap health
 
-**Step 10.** Undeploy ONAP
+**Step 10.** Undeploy ONAP::
 
-> helm undeploy dev --purge
+  > helm undeploy dev --purge
 
 More examples of using the deploy and undeploy plugins can be found here: https://wiki.onap.org/display/DW/OOM+Helm+%28un%29Deploy+plugins
index f19924d..48701f7 100644 (file)
@@ -250,7 +250,7 @@ precedence of all.
 The top level onap/values.yaml file contains the values required to be set
 before deploying ONAP.  Here is the contents of this file:
 
-.. include:: onap_values.yaml
+.. include:: ../kubernetes/onap/values.yaml
    :code: yaml
 
 One may wish to create a value file that is specific to a given deployment such
index 81954e5..18747ec 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 81954e51ef4c04fb08182d779f4871dfca766221
+Subproject commit 18747ec29947084c571d66f37f1a0fe85fbe4702
index c52c6e3..22d3836 100755 (executable)
@@ -171,6 +171,9 @@ ln -s ${hostdir}/snapshots ${ODL_HOME}/snapshots
 echo "Starting cdt-proxy-service jar, logging to ${APPC_HOME}/cdt-proxy-service/jar.log"
 java -jar ${APPC_HOME}/cdt-proxy-service/cdt-proxy-service.jar > ${APPC_HOME}/cdt-proxy-service/jar.log &
 
+echo "Starting dmaap-event-service jar, logging to ${APPC_HOME}/dmaap-event-service/jar.log"
+java -jar -Dorg_onap_appc_bootstrap_path=/opt/onap/appc/data/properties -Dorg_onap_appc_bootstrap_file=appc.properties ${APPC_HOME}/dmaap-event-service/dmaap-event-service.jar > ${APPC_HOME}/dmaap-event-service/jar.log &
+
 echo "Adding a property system.properties for AAF cadi.properties location"
 echo "" >> ${ODL_HOME}/etc/system.properties
 echo "cadi_prop_files=${APPC_HOME}/data/properties/cadi.properties" >> ${ODL_HOME}/etc/system.properties
index 58593d9..914d608 100644 (file)
@@ -114,9 +114,9 @@ appc.sdc.provider.url=http://localhost:8181/restconf/operations/AsdcMessage:conf
 
 # Properties used by EventSenderDmaapImpl.java
 DCAE.dmaap.event.topic.write=EventSenderTest
-DCAE.dmaap.appc.username=test
-DCAE.dmaap.appc.password=test
-DCAE.dmaap.event.pool.members=message-router.{{.Release.Namespace}}:3904
+DCAE.dmaap.event.username=test
+DCAE.dmaap.event.password=test
+DCAE.dmaap.event.poolMembers=message-router.{{.Release.Namespace}}:3904
 
 #OAM Listener
 appc.OAM.disabled=true
@@ -130,3 +130,8 @@ appc.OAM.provider.user={{.Values.config.odlUser}}
 appc.OAM.provider.pass={{.Values.config.odlPassword}}
 
 appc.asdc.env={{.Values.config.dmaapTopicEnv}}
+
+#Properties for communication between appc dmaap microservice and appc
+appc.srvcomm.messaging.username={{.Values.config.dmaapServiceUser}}
+appc.srvcomm.messaging.password={{.Values.config.dmaapServicePassword}}
+appc.srvcomm.messaging.url={{.Values.config.dmaapServiceUrl}}
index 2312638..12defea 100644 (file)
@@ -65,6 +65,9 @@ config:
   openStackUserName: admin
   openStackEncryptedPassword: enc:LDEbHEAvTF1R
   odlUser: admin
+  dmaapServiceUrl: http://localhost:8080/publish
+  dmaapServiceUser: appc
+  dmaapServicePassword: onapappc
 
 appc-ansible-server:
   service:
index 562cd54..bdb1871 100644 (file)
@@ -56,7 +56,7 @@ spec:
               value: {{ .Values.config.api.controller.http.baseUrl }}
             - name: API_BLUEPRINT_CONTROLLER_HTTP_AUTH_TOKEN
               value: {{ .Values.config.api.controller.http.authToken }}
-            - name: API_BLUEPRINT_PROCESSOR_HHTP_BASE_URL
+            - name: API_BLUEPRINT_PROCESSOR_HTTP_BASE_URL
               value: {{ .Values.config.api.processor.http.baseUrl }}
             - name: API_BLUEPRINT_PROCESSOR_HTTP_AUTH_TOKEN
               value: {{ .Values.config.api.processor.http.authToken }}
index 3b7659a..8fd2c7a 100644 (file)
@@ -40,7 +40,7 @@ config:
   api:
     controller:
       http:
-       baseUrl: http://cds-controller-blueprints:8080/api/v1
+       baseUrl: http://cds-blueprints-processor-http:8081/api/v1
        authToken: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
     processor:
       http:
diff --git a/kubernetes/clamp/templates/ingress.yaml b/kubernetes/clamp/templates/ingress.yaml
new file mode 100644 (file)
index 0000000..8f87c68
--- /dev/null
@@ -0,0 +1 @@
+{{ include "common.ingress" . }}
index 92d4bb7..d66273d 100644 (file)
@@ -83,6 +83,12 @@ service:
 
 ingress:
   enabled: false
+  service:
+    - baseaddr: "clamp"
+      name: "clamp"
+      port: 443
+  config:
+    ssl: "redirect"
 
 #resources: {}
   # We usually recommend not to specify default resources and to leave this as a conscious
diff --git a/kubernetes/cli/templates/ingress.yaml b/kubernetes/cli/templates/ingress.yaml
new file mode 100644 (file)
index 0000000..8f87c68
--- /dev/null
@@ -0,0 +1 @@
+{{ include "common.ingress" . }}
index 0fbe21d..7278c99 100644 (file)
@@ -63,6 +63,15 @@ service:
 
 ingress:
   enabled: false
+  service:
+    - baseaddr: "cli"
+      name: "cli"
+      port: 8080
+    - baseaddr: "cli2"
+      name: cli
+      port: 9090
+  config:
+    ssl: "none"
 
 # Configure resource requests and limits
 # ref: http://kubernetes.io/docs/user-guide/compute-resources/
diff --git a/kubernetes/common/common/templates/_createPassword.tpl b/kubernetes/common/common/templates/_createPassword.tpl
new file mode 100644 (file)
index 0000000..938b0ee
--- /dev/null
@@ -0,0 +1,62 @@
+{{/*
+# Copyright © 2019 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.
+*/}}
+
+{{/*
+  Resolve the master password to be used to derive other passwords. The value of
+  .Values.masterPassword is used by default, unless either override mechanism is
+  used:
+
+  - .Values.global.masterPassword  : override default master password for all charts
+  - .Values.masterPasswordOverride : override global and default masterPassword on a per chart basis
+*/}}
+{{- define "common.masterPassword" -}}
+  {{ if .Values.masterPasswordOverride }}
+    {{- printf "%d" .Values.masterPasswordOverride -}}
+  {{ else if .Values.global.masterPassword }}
+    {{- printf "%d" .Values.global.masterPassword -}}
+  {{ else if .Values.masterPassword }}
+    {{- printf "%d" .Values.masterPassword -}}
+  {{ else }}
+    {{ fail "masterPassword not provided" }}
+  {{ end }}
+{{- end -}}
+
+{{/*
+  Generate a new password based on masterPassword. The new password is not
+  random, it is derived from masterPassword, fully qualified chart name and
+  additional uid provided by the user. This ensures that every time when we
+  run this function from the same place, with the same password and uid we
+  get the same results. This allows to avoid password changes while you are
+  doing upgrade.
+
+  The function can take from one to three arguments (inside a dictionary):
+  - .dot : environment (.)
+  - .uid : unique identifier of password to be generated within this particular chart. Use only when you create more than a single password within one chart
+  - .strength : complexity of derived password. See derivePassword documentation for more details
+
+  Example calls:
+
+    {{ include "common.createPassword" . }}
+    {{ include "common.createPassword" (dict "dot" . "uid" "mysqlRootPasswd") }}
+
+*/}}
+{{- define "common.createPassword" -}}
+  {{- $dot := default . .dot -}}
+  {{- $uid := default "onap" .uid -}}
+  {{- $strength := default "long" .strength -}}
+  {{- $mp := include "common.masterPassword" $dot -}}
+  {{- derivePassword 1 $strength $mp (include "common.fullname" $dot) $uid -}}
+{{- end -}}
index 49d7eeb..b4afe63 100644 (file)
@@ -1,12 +1,24 @@
 {{- define "ingress.config.port" -}}
 {{- if .Values.ingress -}}
-{{- if .Values.ingress.service -}}
+{{- if or (not .Values.global.ingress.virtualhost) (not .Values.global.ingress.virtualhost.enabled) -}}
+  - http:
+      paths:
 {{- range .Values.ingress.service }}
-        - path: {{ .path }}
+        - path: {{  printf "/%s" (required "baseaddr" .baseaddr) }}
           backend:
             serviceName: {{ .name }}
             servicePort: {{ .port }}
 {{- end -}}
+{{- else if .Values.ingress.service -}}
+{{- $burl := (required "baseurl" .Values.global.ingress.virtualhost.baseurl) -}}
+{{ range .Values.ingress.service }}
+  - host: {{ printf "%s.%s" (required "baseaddr" .baseaddr) $burl }}
+    http:
+      paths:
+      - backend:
+          serviceName: {{ .name }}
+          servicePort: {{ .port }}
+{{- end -}}
 {{- else -}}
         - path: {{ printf "/%s" .Chart.Name }}
           backend:
 {{- end -}}
 
 
+{{- define "ingress.config.annotations.ssl" -}}
+{{- if .Values.ingress.config -}}
+{{- if .Values.ingress.config.ssl -}}
+{{- if eq .Values.ingress.config.ssl "redirect" -}}
+kubernetes.io/ingress.class: nginx
+nginx.ingress.kubernetes.io/ssl-passthrough: "true"
+nginx.ingress.kubernetes.io/ssl-redirect: "true"
+{{-  else if eq .Values.ingress.config.ssl "native" -}}
+nginx.ingress.kubernetes.io/ssl-redirect: "true"
+{{-  else if eq .Values.ingress.config.ssl "none" -}}
+nginx.ingress.kubernetes.io/ssl-redirect: "false"
+{{- end -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+
 {{- define "ingress.config.annotations" -}}
 {{- if .Values.ingress -}}
 {{- if .Values.ingress.annotations -}}
 {{ toYaml .Values.ingress.annotations | indent 4 | trim }}
 {{- end -}}
 {{- end -}}
+{{ include "ingress.config.annotations.ssl" . | indent 4 | trim }}
 {{- end -}}
 
 
 {{- define "common.ingress" -}}
 {{- if .Values.ingress -}}
-{{- if .Values.ingress.enabled -}}
+{{- if .Values.global.ingress -}}
+{{- if and .Values.ingress.enabled .Values.global.ingress.enabled -}}
 apiVersion: extensions/v1beta1
 kind: Ingress
 metadata:
@@ -42,9 +73,7 @@ metadata:
     heritage: {{ .Release.Service }}
 spec:
   rules:
-  - http:
-      paths:
-        {{- include "ingress.config.port" . }}
+  {{ include "ingress.config.port" . | trim }}
 {{- if .Values.ingress.tls }}
   tls:
 {{ toYaml .Values.ingress.tls | indent 4 }}
@@ -52,4 +81,4 @@ spec:
 {{- end -}}
 {{- end -}}
 {{- end -}}
-
+{{- end -}}
\ No newline at end of file
diff --git a/kubernetes/common/common/templates/_mariadb.tpl b/kubernetes/common/common/templates/_mariadb.tpl
new file mode 100644 (file)
index 0000000..cd7142f
--- /dev/null
@@ -0,0 +1,59 @@
+{{/*
+# Copyright © 2019 Orange
+#
+# 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.
+*/}}
+
+{{/*
+  Choose the name of the mariadb service to use.
+*/}}
+{{- define "common.mariadbService" -}}
+  {{- if .Values.global.mariadbGalera.localCluster -}}
+    {{- index .Values "mariadb-galera" "service" "name" -}}
+  {{- else -}}
+    {{- .Values.global.mariadbGalera.service -}}
+  {{- end -}}
+{{- end -}}
+
+{{/*
+  Choose the value of mariadb port to use.
+*/}}
+{{- define "common.mariadbPort" -}}
+  {{- if .Values.global.mariadbGalera.localCluster -}}
+    {{- index .Values "mariadb-galera" "service" "internalPort" -}}
+  {{- else -}}
+    {{- .Values.global.mariadbGalera.internalPort -}}
+  {{- end -}}
+{{- end -}}
+
+{{/*
+  Choose the value of secret to retrieve user value.
+*/}}
+{{- define "common.mariadbSecret" -}}
+  {{- if .Values.global.mariadbGalera.localCluster -}}
+    {{ printf "%s-%s" (include "common.fullname" .) (index .Values "mariadb-galera" "nameOverride") -}}
+  {{- else -}}
+    {{ printf "%s-%s" (.Release.Name) (index .Values "mariadb-init" "nameOverride") -}}
+  {{- end -}}
+{{- end -}}
+
+{{/*
+  Choose the value of secret param to retrieve user value.
+*/}}
+{{- define "common.mariadbSecretParam" -}}
+  {{- if .Values.global.mariadbGalera.localCluster -}}
+    {{ printf "user-password" -}}
+  {{- else -}}
+    {{ printf "db-user-password" -}}
+  {{- end -}}
+{{- end -}}
index 4299984..f84ca21 100644 (file)
 {{- define "common.fullname" -}}
   {{- $name := default .Chart.Name .Values.nameOverride -}}
   {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
\ No newline at end of file
+{{- end -}}
+
+{{/*
+  Retrieve the "original" release from the component release:
+  if ONAP is deploy with "helm deploy --name toto", then cassandra components
+  will have "toto-cassandra" as release name.
+  this function would answer back "toto".
+*/}}
+{{- define "common.release" -}}
+  {{- regexReplaceAll "-[a-zA-Z0-9]*$" .Release.Name ""  }}
+{{- end -}}
diff --git a/kubernetes/common/common/templates/_storageClass.tpl b/kubernetes/common/common/templates/_storageClass.tpl
new file mode 100644 (file)
index 0000000..8fd1f97
--- /dev/null
@@ -0,0 +1,57 @@
+{{/*
+# Copyright © 2019 Amdocs, Bell Canada, Orange
+#
+# 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.
+*/}}
+
+{{/*
+  Expand the name of the storage class.
+  The value "common.fullname"-data is used by default,
+  unless either override mechanism is used.
+
+  - .Values.global.persistence.storageClass  : override default storageClass for all charts
+  - .Values.persistence.storageClassOverride : override global and default storage class on a per chart basis
+  - .Values.persistence.storageClass         : override default storage class on a per chart basis
+*/}}
+{{- define "common.storageClass" -}}
+  {{- if .Values.persistence.storageClassOverride -}}
+    {{- if ne "-" .Values.persistence.storageClassOverride -}}
+      {{- printf "%s" .Values.persistence.storageClassOverride -}}
+    {{- else -}}
+      {{- $storage_class := "" -}}
+      {{- printf "%q" $storage_class -}}
+    {{- end -}}
+  {{- else -}}
+    {{- if or .Values.persistence.storageClass .Values.global.persistence.storageClass }}
+      {{- if ne "-" (default .Values.persistence.storageClass .Values.global.persistence.storageClass) -}}
+        {{- printf "%s" (default .Values.persistence.storageClass .Values.global.persistence.storageClass) -}}
+      {{- else -}}
+        {{- $storage_class := "" -}}
+        {{- printf "%q" $storage_class -}}
+      {{- end -}}
+    {{- else -}}
+      {{- printf "%s-data" (include "common.fullname" .) -}}
+    {{- end -}}
+  {{- end -}}
+{{- end -}}
+
+{{/*
+  Calculate if we need a PV. If a storageClass is provided, then we don't need.
+*/}}
+{{- define "common.needPV" -}}
+{{- if or (or .Values.persistence.storageClassOverride .Values.persistence.storageClass) .Values.global.persistence.storageClass -}}
+  False
+{{- else -}}
+  True
+{{- end -}}
+{{- end -}}
index 9c9a248..ff6e119 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-confd
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-data:
-{{ tpl (.Files.Glob "resources/config/mariadb/conf.d/*").AsConfig . | indent 2 }}
----
 {{- if .Values.externalConfig }}
 apiVersion: v1
 kind: ConfigMap
@@ -39,4 +26,4 @@ metadata:
 data:
   my_extra.cnf: |
 {{ .Values.externalConfig | indent 4 }}
-{{- end -}}
\ No newline at end of file
+{{- end -}}
index a2096fd..96bd94e 100644 (file)
@@ -1,5 +1,5 @@
 {{/*
-# Copyright © 2017 Amdocs, Bell Canada
+# Copyright © 2019 Amdocs, Bell Canada, Orange
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # limitations under the License.
 */}}
 {{- $global := . }}
-{{- if and $global.Values.persistence.enabled (not $global.Values.persistence.existingClaim) -}}
-{{- range $i, $t := until (int $global.Values.replicaCount)}}
+{{- if and $global.Values.persistence.enabled (not $global.Values.persistence.existingClaim) }}
+{{- if eq "True" (include "common.needPV" .) -}}
+{{- range $i := until (int $global.Values.replicaCount)}}
 kind: PersistentVolume
 apiVersion: v1
 metadata:
-  name: {{ include "common.fullname" $global }}-data{{$i}}
+  name: {{ include "common.fullname" $global }}-data-{{$i}}
   namespace: {{ include "common.namespace" $global }}
   labels:
     app: {{ include "common.fullname" $global }}
@@ -35,7 +36,10 @@ spec:
   persistentVolumeReclaimPolicy: {{ $global.Values.persistence.volumeReclaimPolicy }}
   storageClassName: "{{ include "common.fullname" $global }}-data"
   hostPath:
-    path: {{ $global.Values.global.persistence.mountPath | default $global.Values.persistence.mountPath }}/{{ $global.Release.Name }}/{{ $global.Values.persistence.mountSubPath }}{{$i}}
+    path: {{ $global.Values.global.persistence.mountPath | default $global.Values.persistence.mountPath }}/{{ $global.Release.Name }}/{{ $global.Values.persistence.mountSubPath }}-{{$i}}
+{{if ne $i (int $global.Values.replicaCount) }}
 ---
 {{- end -}}
 {{- end -}}
+{{- end -}}
+{{- end -}}
index b0b7174..2e77036 100644 (file)
@@ -130,11 +130,8 @@ spec:
     spec:
       accessModes:
       - {{ .Values.persistence.accessMode | quote }}
-      storageClassName: {{ include "common.fullname" . }}-data
+      storageClassName: {{ include "common.storageClass" . }}
       resources:
         requests:
           storage: {{ .Values.persistence.size | quote }}
-      selector:
-        matchLabels:
-          name: {{ include "common.fullname" . }}
 {{- end }}
diff --git a/kubernetes/common/mariadb-galera/tests/pv_test.yaml b/kubernetes/common/mariadb-galera/tests/pv_test.yaml
new file mode 100644 (file)
index 0000000..cd40079
--- /dev/null
@@ -0,0 +1,35 @@
+---
+suite: test pv behavior
+templates:
+  - pv.yaml
+tests:
+  - it: 'should render "" (global case))'
+    values:
+      - ./values/persistence.yaml
+    set:
+      global.persistence.storageClass: "-"
+    asserts:
+      - isEmpty:
+
+  - it: 'should "" (override case)'
+    values:
+      - ./values/persistence.yaml
+    set:
+      global.persistence.storageClass: "global"
+      persistence.storageClassOverride: "-"
+    asserts:
+      - isEmpty:
+
+  - it: 'should "" (local case)'
+    values:
+      - ./values/persistence.yaml
+    set:
+      persistence.storageClass: "-"
+    asserts:
+      - isEmpty:
+
+  - it: 'should render "RELEASE-NAME-mariadb-galera-data" as storageClassname'
+    asserts:
+      - equal:
+          path: spec.storageClassName
+          value: "RELEASE-NAME-mariadb-galera-data"
diff --git a/kubernetes/common/mariadb-galera/tests/storage_class_test.yaml b/kubernetes/common/mariadb-galera/tests/storage_class_test.yaml
new file mode 100644 (file)
index 0000000..9b7bdcb
--- /dev/null
@@ -0,0 +1,67 @@
+---
+suite: test storage class behavior
+templates:
+  - statefulset.yaml
+tests:
+  - it: 'should render "" as storageClassname (global case)'
+    values:
+      - ./values/persistence.yaml
+    set:
+      global.persistence.storageClass: "-"
+    asserts:
+      - isEmpty:
+          path: spec.volumeClaimTemplates[0].spec.storageClassName
+
+  - it: 'should "" as storageClassname (override case)'
+    values:
+      - ./values/persistence.yaml
+    set:
+      global.persistence.storageClass: "global"
+      persistence.storageClassOverride: "-"
+    asserts:
+      - isEmpty:
+          path: spec.volumeClaimTemplates[0].spec.storageClassName
+
+  - it: 'should "" as storageClassname (local case)'
+    values:
+      - ./values/persistence.yaml
+    set:
+      persistence.storageClass: "-"
+    asserts:
+      - isEmpty:
+          path: spec.volumeClaimTemplates[0].spec.storageClassName
+
+  - it: 'should render "global" as storageClassname'
+    values:
+      - ./values/persistence.yaml
+    set:
+      global.persistence.storageClass: "global"
+    asserts:
+      - equal:
+          path: spec.volumeClaimTemplates[0].spec.storageClassName
+          value: "global"
+
+  - it: 'should render "local" as storageClassname'
+    values:
+      - ./values/persistence.yaml
+    asserts:
+      - equal:
+          path: spec.volumeClaimTemplates[0].spec.storageClassName
+          value: "local"
+
+  - it: 'should render "override" as storageClassname'
+    values:
+      - ./values/persistence.yaml
+    set:
+      global.persistence.storageClass: "global"
+      persistence.storageClassOverride: "override"
+    asserts:
+      - equal:
+          path: spec.volumeClaimTemplates[0].spec.storageClassName
+          value: "override"
+
+  - it: 'should render "RELEASE-NAME-mariadb-galera-data" as storageClassname'
+    asserts:
+      - equal:
+          path: spec.volumeClaimTemplates[0].spec.storageClassName
+          value: "RELEASE-NAME-mariadb-galera-data"
diff --git a/kubernetes/common/mariadb-galera/tests/values/persistence.yaml b/kubernetes/common/mariadb-galera/tests/values/persistence.yaml
new file mode 100644 (file)
index 0000000..a282f74
--- /dev/null
@@ -0,0 +1,6 @@
+---
+persistence:
+  enabled: true
+  existingClaim: false
+  size: 10Gb
+  storageClass: "local"
index a662b1e..14215e4 100644 (file)
@@ -35,7 +35,7 @@ global:
 #repository: mysql
 repository: nexus3.onap.org:10001
 image: adfinissygroup/k8s-mariadb-galera-centos:v002
-backupImage: library/mariadb:10.1.38 
+backupImage: library/mariadb:10.1.38
 imageInit: busybox
 pullPolicy: IfNotPresent
 
@@ -91,7 +91,7 @@ persistence:
   mountSubPath: "mariadb-galera/data"
   mysqlPath: /var/lib/mysql
   backup:
-    mountPath: /dockerdata-nfs/backup
+    mountPath: /dockerdata-nfs/backup{{- if or (or .Values.storageClassOverride .Values.persistence.storageClass) .Values.global.persistence.storageClass -}}
 
 service:
   internalPort: 3306
diff --git a/kubernetes/common/mariadb-init/.helmignore b/kubernetes/common/mariadb-init/.helmignore
new file mode 100644 (file)
index 0000000..dadf202
--- /dev/null
@@ -0,0 +1,23 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+
+tests
@@ -1,4 +1,4 @@
-# Copyright (c) 2019 Lenovo
+# Copyright © 2018 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.
@@ -13,6 +13,6 @@
 # limitations under the License.
 
 apiVersion: v1
-description: ONAP multicloud OpenStack Lenovo Plugin
-name: multicloud-lenovo
+description: Chart for MariaDB Galera init job
+name: mariadb-init
 version: 5.0.0
diff --git a/kubernetes/common/mariadb-init/requirements.yaml b/kubernetes/common/mariadb-init/requirements.yaml
new file mode 100644 (file)
index 0000000..d323dda
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright © 2018 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.
+
+dependencies:
+  - name: common
+    version: ~5.x-0
+    repository: 'file://../common'
\ No newline at end of file
diff --git a/kubernetes/common/mariadb-init/resources/config/db_init.sh b/kubernetes/common/mariadb-init/resources/config/db_init.sh
new file mode 100755 (executable)
index 0000000..304835b
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/sh
+# Copyright © 2019 Orange
+#
+# 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.
+
+echo "Creating database {{ .Values.config.mysqlDatabase }} and user {{ .Values.config.userName }}..."
+
+mysql -h ${DB_HOST} -P ${DB_PORT} -uroot -p$MYSQL_ROOT_PASSWORD -e "CREATE OR REPLACE USER '{{ .Values.config.userName }}'@'%' IDENTIFIED BY '${MYSQL_PASSWORD}'"
+mysql -h ${DB_HOST} -P ${DB_PORT} -uroot -p$MYSQL_ROOT_PASSWORD -e "CREATE DATABASE IF NOT EXISTS {{ .Values.config.mysqlDatabase }}"
+mysql -h ${DB_HOST} -P ${DB_PORT} -uroot -p$MYSQL_ROOT_PASSWORD -e "GRANT ALL PRIVILEGES ON {{ .Values.config.mysqlDatabase }}.* TO '{{ .Values.config.userName }}'@'%'"
+
+echo "Created database {{ .Values.config.mysqlDatabase }} and user {{ .Values.config.userName }}."
+
+{{ range $db, $dbInfos := .Values.config.mysqlAdditionalDatabases -}}
+echo "Creating database {{ $db }} and user {{ $dbInfos.user }}..."
+
+mysql -h ${DB_HOST} -P ${DB_PORT} -uroot -p$MYSQL_ROOT_PASSWORD -e "CREATE OR REPLACE USER '{{ $dbInfos.user }}'@'%' IDENTIFIED BY '${MYSQL_PASSWORD_{{ $db | upper }}}'"
+mysql -h ${DB_HOST} -P ${DB_PORT} -uroot -p$MYSQL_ROOT_PASSWORD -e "CREATE DATABASE IF NOT EXISTS {{ $db }}"
+mysql -h ${DB_HOST} -P ${DB_PORT} -uroot -p$MYSQL_ROOT_PASSWORD -e "GRANT ALL PRIVILEGES ON {{ $db }}.* TO '{{ $dbInfos.user }}'@'%'"
+
+echo "Created database {{ $db }} and user {{ $dbInfos.user }}."
+{{ end }}
diff --git a/kubernetes/common/mariadb-init/templates/_configmap.tpl b/kubernetes/common/mariadb-init/templates/_configmap.tpl
new file mode 100644 (file)
index 0000000..ea612a0
--- /dev/null
@@ -0,0 +1,26 @@
+{{/*
+# Copyright © 2019 Orange
+#
+# 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.
+*/}}
+
+{{/*
+  Choose the name of the configmap to use.
+*/}}
+{{- define "mariadbInit.configMap" -}}
+  {{- if (eq "default" .Values.config.config_map) -}}
+    {{- include "common.fullname" . -}}
+  {{- else -}}
+    {{- printf "%s-%s" (include "common.release" .) .Values.config.config_map -}}
+  {{- end -}}
+{{- end -}}
diff --git a/kubernetes/common/mariadb-init/templates/_mariadb.tpl b/kubernetes/common/mariadb-init/templates/_mariadb.tpl
new file mode 100644 (file)
index 0000000..4f111a5
--- /dev/null
@@ -0,0 +1,26 @@
+{{/*
+# Copyright © 2019 Orange
+#
+# 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.
+*/}}
+
+{{/*
+  Choose the name of the mariadb secret to use.
+*/}}
+{{- define "mariadbInit.mariadbClusterSecret" -}}
+  {{- if (eq "default" .Values.global.mariadbGalera.userRootSecret) -}}
+    {{- printf "%s-mariadb-galera-%s" (include "common.release" .) .Values.global.mariadbGalera.nameOverride -}}
+  {{- else -}}
+    {{- .Values.global.mariadbGalera.userRootSecret -}}
+  {{- end -}}
+{{- end -}}
@@ -1,4 +1,4 @@
-# Copyright © 2017 Amdocs, Bell Canada
+# Copyright © 2019 Orange
 # Modifications Copyright © 2018 AT&T
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # limitations under the License.
 
 apiVersion: v1
-kind: Secret
+kind: ConfigMap
 metadata:
-  name: {{ include "common.fullname" . }}-secret
+  name: {{ include "common.fullname" . }}
   namespace: {{ include "common.namespace" . }}
   labels:
     app: {{ include "common.name" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
-type: Opaque
 data:
-  db-root-password: {{ .Values.config.mysqlRootPassword | b64enc | quote }}
-  db-user-password: {{ .Values.config.mysqlPassword | b64enc | quote }}
-
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
diff --git a/kubernetes/common/mariadb-init/templates/job.yaml b/kubernetes/common/mariadb-init/templates/job.yaml
new file mode 100644 (file)
index 0000000..679c10c
--- /dev/null
@@ -0,0 +1,105 @@
+# Copyright © 2019 Orange
+#
+# 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: batch/v1
+kind: Job
+metadata:
+  name: {{ include "common.fullname" . }}-config-job
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  backoffLimit: 20
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+      name: {{ include "common.name" . }}
+    spec:
+      initContainers:
+      - name: {{ include "common.name" . }}-readiness
+        command:
+        - /root/ready.py
+        args:
+        - --container-name
+        - {{ .Values.global.mariadbGalera.nameOverride }}
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+      containers:
+      - name: {{ include "common.name" . }}
+        image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        command:
+        - bash
+        - /db_init/db_init.sh
+        env:
+        - name: DB_HOST
+          value: "{{ .Values.global.mariadbGalera.nameOverride }}"
+        - name: DB_PORT
+          value: "{{ .Values.global.mariadbGalera.servicePort }}"
+        - name: MYSQL_ROOT_PASSWORD
+          valueFrom:
+            secretKeyRef:
+              name: {{ include "mariadbInit.mariadbClusterSecret" . }}
+              key: {{ .Values.global.mariadbGalera.userRootSecretKey }}
+        - name: MYSQL_PASSWORD
+          valueFrom:
+            secretKeyRef:
+              name: {{ template "common.fullname" . }}
+              key: db-user-password
+{{- $root := . }}
+{{ range $db, $_value := .Values.config.mysqlAdditionalDatabases }}
+        - name: {{ printf "MYSQL_PASSWORD_%s" $db | upper }}
+          valueFrom:
+            secretKeyRef:
+              name: {{ template "common.fullname" $root }}-secret
+              key: {{ printf "db-%s-user-password" $db }}
+{{ end }}
+        volumeMounts:
+        - mountPath: /etc/localtime
+          name: localtime
+          readOnly: true
+        - name: mariadb-conf
+          mountPath: /db_init/
+          readOnly: true
+        resources:
+{{ include "common.resources" . | indent 12 }}
+      {{- if .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 10 }}
+      {{- end -}}
+      {{- if .Values.affinity }}
+      affinity:
+{{ toYaml .Values.affinity | indent 10 }}
+      {{- end }}
+      volumes:
+      - name: mariadb-conf
+        configMap:
+          name: {{ include "mariadbInit.configMap" . }}
+      - name: localtime
+        hostPath:
+          path: /etc/localtime
+      restartPolicy: Never
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/common/mariadb-init/templates/secret.yaml b/kubernetes/common/mariadb-init/templates/secret.yaml
new file mode 100644 (file)
index 0000000..f30d582
--- /dev/null
@@ -0,0 +1,30 @@
+# Copyright © 2017 Amdocs, Bell Canada, Orange
+#
+# 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
+kind: Secret
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+type: Opaque
+data:
+  db-user-password: {{ index .Values.config.userPassword | b64enc | quote }}
+{{ range $db, $dbInfos := .Values.config.mysqlAdditionalDatabases }}
+  {{ printf "db-%s-user-password" $db}}: {{ $dbInfos.password | b64enc | quote }}
+{{ end }}
diff --git a/kubernetes/common/mariadb-init/tests/configmap_test.yaml b/kubernetes/common/mariadb-init/tests/configmap_test.yaml
new file mode 100644 (file)
index 0000000..34914cd
--- /dev/null
@@ -0,0 +1,114 @@
+---
+suite: test configmap behavior
+templates:
+  - configmap.yaml
+tests:
+  - it: "should render with default value"
+    asserts:
+      - isKind:
+          of: ConfigMap
+      - equal:
+          path: metadata.name
+          value: RELEASE-NAME-mariadb-init
+      - equal:
+          path: metadata.namespace
+          value: NAMESPACE
+      - matchRegex:
+          path: metadata.labels.app
+          pattern: mariadb-init
+      - equal:
+          path: data
+          value:
+            db_init.sh: |
+              #!/bin/sh
+              # Copyright © 2019 Orange
+              #
+              # 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.
+
+              echo "Creating database ynsaUCru6mUNwGal and user u5WZ1GMSIS1wHZF..."
+
+              mysql -h ${DB_HOST} -P ${DB_PORT} -uroot -p$MYSQL_ROOT_PASSWORD << 'EOF' || exit 1
+              CREATE OR REPLACE USER 'u5WZ1GMSIS1wHZF'@'localhost' IDENTIFIED BY '${MYSQL_PASSWORD}';
+              CREATE OR REPLACE USER 'u5WZ1GMSIS1wHZF'@'%' IDENTIFIED BY '${MYSQL_PASSWORD}';
+              CREATE DATABASE IF NOT EXISTS ynsaUCru6mUNwGal;
+              GRANT ALL PRIVILEGES ON ynsaUCru6mUNwGal.* TO 'u5WZ1GMSIS1wHZF'@'%';
+              GRANT ALL PRIVILEGES ON ynsaUCru6mUNwGal.* TO 'u5WZ1GMSIS1wHZF'@'localhost';
+              EOF
+
+              echo "Created database ynsaUCru6mUNwGal and user u5WZ1GMSIS1wHZF."
+  - it: "shoud render with other databases"
+    set:
+      config:
+        userName: testUser
+        mysqlDatabase: testDB
+        mysqlAdditionalDatabases:
+          dbOne:
+            user: one
+            password: pwd1
+          dbTwo:
+            user: two
+            password: pwd2
+    asserts:
+      - equal:
+          path: data
+          value:
+            db_init.sh: |
+              #!/bin/sh
+              # Copyright © 2019 Orange
+              #
+              # 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.
+
+              echo "Creating database testDB and user testUser..."
+
+              mysql -h ${DB_HOST} -P ${DB_PORT} -uroot -p$MYSQL_ROOT_PASSWORD << 'EOF' || exit 1
+              CREATE OR REPLACE USER 'testUser'@'localhost' IDENTIFIED BY '${MYSQL_PASSWORD}';
+              CREATE OR REPLACE USER 'testUser'@'%' IDENTIFIED BY '${MYSQL_PASSWORD}';
+              CREATE DATABASE IF NOT EXISTS testDB;
+              GRANT ALL PRIVILEGES ON testDB.* TO 'testUser'@'%';
+              GRANT ALL PRIVILEGES ON testDB.* TO 'testUser'@'localhost';
+              EOF
+
+              echo "Created database testDB and user testUser."
+
+              echo "Creating database dbOne and user one..."
+
+              mysql -h ${DB_HOST} -P ${DB_PORT} -uroot -p$MYSQL_ROOT_PASSWORD << 'EOF' || exit 1
+              CREATE OR REPLACE USER 'one'@'localhost' IDENTIFIED BY '${MYSQL_PASSWORD_DBONE}';
+              CREATE OR REPLACE USER 'one'@'%' IDENTIFIED BY '${MYSQL_PASSWORD_DBONE}';
+              CREATE DATABASE IF NOT EXISTS dbOne;
+              GRANT ALL PRIVILEGES ON dbOne.* TO 'one'@'%';
+              GRANT ALL PRIVILEGES ON dbOne.* TO 'one'@'localhost';
+              EOF
+
+              echo "Created database dbOne and user one."
+              echo "Creating database dbTwo and user two..."
+
+              mysql -h ${DB_HOST} -P ${DB_PORT} -uroot -p$MYSQL_ROOT_PASSWORD << 'EOF' || exit 1
+              CREATE OR REPLACE USER 'two'@'localhost' IDENTIFIED BY '${MYSQL_PASSWORD_DBTWO}';
+              CREATE OR REPLACE USER 'two'@'%' IDENTIFIED BY '${MYSQL_PASSWORD_DBTWO}';
+              CREATE DATABASE IF NOT EXISTS dbTwo;
+              GRANT ALL PRIVILEGES ON dbTwo.* TO 'two'@'%';
+              GRANT ALL PRIVILEGES ON dbTwo.* TO 'two'@'localhost';
+              EOF
+
+              echo "Created database dbTwo and user two."
diff --git a/kubernetes/common/mariadb-init/tests/job_test.yaml b/kubernetes/common/mariadb-init/tests/job_test.yaml
new file mode 100644 (file)
index 0000000..7523ee1
--- /dev/null
@@ -0,0 +1,307 @@
+---
+suite: test job behavior
+templates:
+  - job.yaml
+tests:
+  - it: "should render with default value (global)"
+    asserts:
+      - isKind:
+          of: Job
+      - matchRegex:
+          path: metadata.name
+          pattern: -mariadb-init-config-job$
+      - equal:
+          path: metadata.namespace
+          value: NAMESPACE
+      - matchRegex:
+          path: metadata.labels.app
+          pattern: mariadb-init
+      - matchRegex:
+          path: spec.template.metadata.labels.app
+          pattern: mariadb-init
+      - matchRegex:
+          path: spec.template.metadata.name
+          pattern: mariadb-init
+      - isNull:
+          path: spec.template.spec.nodeSelector
+      - isNull:
+          path: spec.template.spec.affinity
+  - it: "should render with default value (init container)"
+    asserts:
+      - matchRegex:
+          path: spec.template.spec.initContainers[0].name
+          pattern: mariadb-init-readiness
+      - contains:
+          path: spec.template.spec.initContainers[0].args
+          content: mariadb-galera
+      - equal:
+          path: spec.template.spec.initContainers[0].image
+          value: oomk8s/readiness-check:2.0.2
+      - equal:
+          path: spec.template.spec.initContainers[0].imagePullPolicy
+          value: IfNotPresent
+  - it: "should render with default value (container)"
+    asserts:
+      - matchRegex:
+          path: spec.template.spec.containers[0].name
+          pattern: mariadb-init
+      - equal:
+          path: spec.template.spec.containers[0].image
+          value: nexus3.onap.org:10001/mariadb:10.1.38
+      - equal:
+          path: spec.template.spec.containers[0].imagePullPolicy
+          value: IfNotPresent
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: DB_HOST
+            value: mariadb-galera
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: DB_PORT
+            value: "3306"
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: MYSQL_ROOT_PASSWORD
+            valueFrom:
+              secretKeyRef:
+                name: RELEASE-NAME-mariadb-galera-mariadb-galera
+                key: db-root-password
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: MYSQL_PASSWORD
+            valueFrom:
+              secretKeyRef:
+                name: RELEASE-NAME-mariadb-init-secret
+                key: db-user-password
+      - contains:
+          path: spec.template.spec.containers[0].volumeMounts
+          content:
+            name: mariadb-conf
+            mountPath: /db_init/
+            readOnly: true
+      - equal:
+          path: spec.template.spec.containers[0].resources.limits.cpu
+          value: 100m
+      - equal:
+          path: spec.template.spec.containers[0].resources.limits.memory
+          value: 500Mbi
+      - equal:
+          path: spec.template.spec.containers[0].resources.requests.cpu
+          value: 10m
+      - equal:
+          path: spec.template.spec.containers[0].resources.requests.memory
+          value: 10Mbi
+  - it: "should render with default value (volumes)"
+    asserts:
+      - contains:
+            path: spec.template.spec.volumes
+            content:
+              name: mariadb-conf
+              configMap:
+                name: RELEASE-NAME-mariadb-init
+
+  - it: "should render with nameOverride set"
+    set:
+      nameOverride: myJob
+    asserts:
+      - matchRegex:
+          path: metadata.name
+          pattern: -myJob-config-job$
+      - matchRegex:
+          path: metadata.labels.app
+          pattern: myJob
+      - matchRegex:
+          path: spec.template.metadata.labels.app
+          pattern: myJob
+      - matchRegex:
+          path: spec.template.metadata.name
+          pattern: myJob
+      - matchRegex:
+          path: spec.template.spec.initContainers[0].name
+          pattern: myJob-readiness
+      - matchRegex:
+          path: spec.template.spec.containers[0].name
+          pattern: myJob
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: MYSQL_PASSWORD
+            valueFrom:
+              secretKeyRef:
+                # replicating name from mariadb galera cluster, kind of hardcoded...
+                name: RELEASE-NAME-myJob-secret
+                key: db-user-password
+      - contains:
+            path: spec.template.spec.volumes
+            content:
+              name: mariadb-conf
+              configMap:
+                name: RELEASE-NAME-myJob
+
+  - it: "should render with configmap set"
+    set:
+      config:
+        config_map: myCM
+    asserts:
+      - contains:
+          path: spec.template.spec.volumes
+          content:
+            name: mariadb-conf
+            configMap:
+              name: RELEASE-NAME-myCM
+
+  - it: "should render with mariadbGalera changes"
+    set:
+      global:
+        mariadbGalera:
+            nameOverride: myMaria
+            servicePort: 545
+    asserts:
+      - contains:
+          path: spec.template.spec.initContainers[0].args
+          content: myMaria
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: DB_HOST
+            value: myMaria
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: DB_PORT
+            value: "545"
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: MYSQL_ROOT_PASSWORD
+            valueFrom:
+              secretKeyRef:
+                name: RELEASE-NAME-mariadb-galera-myMaria
+                key: db-root-password
+
+  - it: "should render with full mariadbGalera changes"
+    set:
+      global:
+        mariadbGalera:
+            nameOverride: myMaria
+            servicePort: 545
+            userRootSecret: galera-secret
+            userRootSecretKey: root-password
+    asserts:
+      - contains:
+          path: spec.template.spec.initContainers[0].args
+          content: myMaria
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: DB_HOST
+            value: myMaria
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: DB_PORT
+            value: "545"
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: MYSQL_ROOT_PASSWORD
+            valueFrom:
+              secretKeyRef:
+                name: galera-secret
+                key: root-password
+
+  - it: "should set the right nodeSelector"
+    set:
+      nodeSelector:
+        disktype: ssd
+    asserts:
+      - equal:
+          path: spec.template.spec.nodeSelector.disktype
+          value: ssd
+
+  - it: "should set the right affinity"
+    set:
+      affinity:
+        nodeAffinity:
+          requiredDuringSchedulingIgnoredDuringExecution:
+            nodeSelectorTerms:
+              - matchExpressions:
+                - key: kubernetes.io/e2e-az-name
+                  operator: In
+                  values:
+                    - e2e-az1
+                    - e2e-az2
+    asserts:
+      - equal:
+          path: spec.template.spec.affinity
+          value:
+            nodeAffinity:
+              requiredDuringSchedulingIgnoredDuringExecution:
+                nodeSelectorTerms:
+                  - matchExpressions:
+                    - key: kubernetes.io/e2e-az-name
+                      operator: In
+                      values:
+                        - e2e-az1
+                        - e2e-az2
+  - it: "should use large flavor"
+    set:
+      flavor: large
+    asserts:
+      - equal:
+          path: spec.template.spec.containers[0].resources.limits.cpu
+          value: 200m
+      - equal:
+          path: spec.template.spec.containers[0].resources.limits.memory
+          value: 500Mbi
+      - equal:
+          path: spec.template.spec.containers[0].resources.requests.cpu
+          value: 20m
+      - equal:
+          path: spec.template.spec.containers[0].resources.requests.memory
+          value: 20Mbi
+  - it: "should use unlimited flavor"
+    set:
+      flavor: unlimited
+    asserts:
+      - isEmpty:
+          path: spec.template.spec.containers[0].resources
+  - it: "shoud render with other databases"
+    set:
+      config:
+        mysqlAdditionalDatabases:
+          dbOne:
+            user: one
+            password: pwd1
+          dbTwo:
+            user: two
+            password: pwd2
+    asserts:
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: MYSQL_PASSWORD
+            valueFrom:
+              secretKeyRef:
+                name: RELEASE-NAME-mariadb-init-secret
+                key: db-user-password
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: MYSQL_PASSWORD_DBONE
+            valueFrom:
+              secretKeyRef:
+                name: RELEASE-NAME-mariadb-init-secret
+                key: db-dbOne-user-password
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: MYSQL_PASSWORD_DBTWO
+            valueFrom:
+              secretKeyRef:
+                name: RELEASE-NAME-mariadb-init-secret
+                key: db-dbTwo-user-password
diff --git a/kubernetes/common/mariadb-init/tests/secret_test.yaml b/kubernetes/common/mariadb-init/tests/secret_test.yaml
new file mode 100644 (file)
index 0000000..ef0565d
--- /dev/null
@@ -0,0 +1,49 @@
+---
+suite: test secret behavior
+templates:
+  - secret.yaml
+tests:
+  - it: "should render with default values"
+    asserts:
+      - isKind:
+          of: Secret
+      - equal:
+          path: metadata.name
+          value: RELEASE-NAME-mariadb-init
+      - equal:
+          path: metadata.namespace
+          value: NAMESPACE
+      - matchRegex:
+          path: metadata.labels.app
+          pattern: mariadb-init-config-job
+      - equal:
+          path: data.db-user-password
+          value: Q2lAc2hzT2QzcGt5MVZqaQ==
+  - it: "should render specific password value base64 encoded"
+    set:
+      config:
+        userPassword: yolo
+    asserts:
+      - equal:
+          path: data.db-user-password
+          value: eW9sbw==
+  - it: "shoud render with other databases"
+    set:
+      config:
+        mysqlAdditionalDatabases:
+          dbOne:
+            user: one
+            password: pwd1
+          dbTwo:
+            user: two
+            password: pwd2
+    asserts:
+      - equal:
+          path: data.db-user-password
+          value: Q2lAc2hzT2QzcGt5MVZqaQ==
+      - equal:
+          path: data.db-dbOne-user-password
+          value: cHdkMQ==
+      - equal:
+          path: data.db-dbTwo-user-password
+          value: cHdkMg==
diff --git a/kubernetes/common/mariadb-init/values.yaml b/kubernetes/common/mariadb-init/values.yaml
new file mode 100644 (file)
index 0000000..095ff62
--- /dev/null
@@ -0,0 +1,87 @@
+# Copyright © 2018 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.
+
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  repository: nexus3.onap.org:10001
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:2.0.2
+  mariadbGalera:
+    nameOverride: mariadb-galera
+    servicePort: 3306
+    # set these two values if you want to access an 'out of ONAP' mariadb
+    userRootSecret: default
+    userRootSecretKey: db-root-password
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+
+image: mariadb:10.1.38
+pullPolicy: IfNotPresent
+
+# Set it if you want to change the name of the different components
+# nameOverride:
+
+config:
+  userPassword: Ci@shsOd3pky1Vji
+  userName: u5WZ1GMSIS1wHZF
+  mysqlDatabase: ynsaUCru6mUNwGal
+  mysqlAdditionalDatabases: {}
+  # add addtional dabases
+  # this is an dict
+  # Example:
+  # mysqlAdditionalDatabases:
+  #   dbOne:
+  #     user: one
+  #     password: pwd1
+  #   dbTwo:
+  #     user: two
+  #     password: pwd2
+  config_map: default
+
+nodeSelector: {}
+
+affinity: {}
+
+#resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  #
+  # Example:
+  # Configure resource requests and limits
+  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  # Minimum memory for development is 2 CPU cores and 4GB memory
+  # Minimum memory for production is 4 CPU cores and 8GB memory
+flavor: small
+resources:
+  small:
+    limits:
+      cpu: 100m
+      memory: 500Mi
+    requests:
+      cpu: 10m
+      memory: 10Mi
+  large:
+    limits:
+      cpu: 200m
+      memory: 500Mi
+    requests:
+      cpu: 20m
+      memory: 20Mi
+  unlimited: {}
diff --git a/kubernetes/consul/templates/ingress.yaml b/kubernetes/consul/templates/ingress.yaml
new file mode 100644 (file)
index 0000000..8f87c68
--- /dev/null
@@ -0,0 +1 @@
+{{ include "common.ingress" . }}
index 93fd650..d55ea46 100644 (file)
@@ -60,7 +60,13 @@ service: {}
 
 ingress:
   enabled: false
-
+  service:
+    - baseaddr: "consul-server"
+      name: "consul-server"
+      port: 8800
+  config:
+    ssl: "none"
+    
 resources: {}
 
 odl:
diff --git a/kubernetes/contrib/ingress-nginx-post-inst/nginx_ingress_cluster_config.yaml b/kubernetes/contrib/ingress-nginx-post-inst/nginx_ingress_cluster_config.yaml
new file mode 100644 (file)
index 0000000..937828a
--- /dev/null
@@ -0,0 +1,317 @@
+apiVersion: v1
+kind: Namespace
+metadata:
+  name: ingress-nginx
+  labels:
+    app.kubernetes.io/name: ingress-nginx
+    app.kubernetes.io/part-of: ingress-nginx
+
+---
+
+kind: ConfigMap
+apiVersion: v1
+metadata:
+  name: nginx-configuration
+  namespace: ingress-nginx
+  labels:
+    app.kubernetes.io/name: ingress-nginx
+    app.kubernetes.io/part-of: ingress-nginx
+
+---
+kind: ConfigMap
+apiVersion: v1
+metadata:
+  name: tcp-services
+  namespace: ingress-nginx
+  labels:
+    app.kubernetes.io/name: ingress-nginx
+    app.kubernetes.io/part-of: ingress-nginx
+
+---
+kind: ConfigMap
+apiVersion: v1
+metadata:
+  name: udp-services
+  namespace: ingress-nginx
+  labels:
+    app.kubernetes.io/name: ingress-nginx
+    app.kubernetes.io/part-of: ingress-nginx
+
+---
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: nginx-ingress-serviceaccount
+  namespace: ingress-nginx
+  labels:
+    app.kubernetes.io/name: ingress-nginx
+    app.kubernetes.io/part-of: ingress-nginx
+
+---
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRole
+metadata:
+  name: nginx-ingress-clusterrole
+  labels:
+    app.kubernetes.io/name: ingress-nginx
+    app.kubernetes.io/part-of: ingress-nginx
+rules:
+  - apiGroups:
+      - ""
+    resources:
+      - configmaps
+      - endpoints
+      - nodes
+      - pods
+      - secrets
+    verbs:
+      - list
+      - watch
+  - apiGroups:
+      - ""
+    resources:
+      - nodes
+    verbs:
+      - get
+  - apiGroups:
+      - ""
+    resources:
+      - services
+    verbs:
+      - get
+      - list
+      - watch
+  - apiGroups:
+      - ""
+    resources:
+      - events
+    verbs:
+      - create
+      - patch
+  - apiGroups:
+      - "extensions"
+      - "networking.k8s.io"
+    resources:
+      - ingresses
+    verbs:
+      - get
+      - list
+      - watch
+  - apiGroups:
+      - "extensions"
+      - "networking.k8s.io"
+    resources:
+      - ingresses/status
+    verbs:
+      - update
+
+---
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: Role
+metadata:
+  name: nginx-ingress-role
+  namespace: ingress-nginx
+  labels:
+    app.kubernetes.io/name: ingress-nginx
+    app.kubernetes.io/part-of: ingress-nginx
+rules:
+  - apiGroups:
+      - ""
+    resources:
+      - configmaps
+      - pods
+      - secrets
+      - namespaces
+    verbs:
+      - get
+  - apiGroups:
+      - ""
+    resources:
+      - configmaps
+    resourceNames:
+      # Defaults to "<election-id>-<ingress-class>"
+      # Here: "<ingress-controller-leader>-<nginx>"
+      # This has to be adapted if you change either parameter
+      # when launching the nginx-ingress-controller.
+      - "ingress-controller-leader-nginx"
+    verbs:
+      - get
+      - update
+  - apiGroups:
+      - ""
+    resources:
+      - configmaps
+    verbs:
+      - create
+  - apiGroups:
+      - ""
+    resources:
+      - endpoints
+    verbs:
+      - get
+
+---
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: RoleBinding
+metadata:
+  name: nginx-ingress-role-nisa-binding
+  namespace: ingress-nginx
+  labels:
+    app.kubernetes.io/name: ingress-nginx
+    app.kubernetes.io/part-of: ingress-nginx
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: Role
+  name: nginx-ingress-role
+subjects:
+  - kind: ServiceAccount
+    name: nginx-ingress-serviceaccount
+    namespace: ingress-nginx
+
+---
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRoleBinding
+metadata:
+  name: nginx-ingress-clusterrole-nisa-binding
+  labels:
+    app.kubernetes.io/name: ingress-nginx
+    app.kubernetes.io/part-of: ingress-nginx
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: ClusterRole
+  name: nginx-ingress-clusterrole
+subjects:
+  - kind: ServiceAccount
+    name: nginx-ingress-serviceaccount
+    namespace: ingress-nginx
+
+---
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: nginx-ingress-controller
+  namespace: ingress-nginx
+  labels:
+    app.kubernetes.io/name: ingress-nginx
+    app.kubernetes.io/part-of: ingress-nginx
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app.kubernetes.io/name: ingress-nginx
+      app.kubernetes.io/part-of: ingress-nginx
+  template:
+    metadata:
+      labels:
+        app.kubernetes.io/name: ingress-nginx
+        app.kubernetes.io/part-of: ingress-nginx
+      annotations:
+        prometheus.io/port: "10254"
+        prometheus.io/scrape: "true"
+    spec:
+      serviceAccountName: nginx-ingress-serviceaccount
+      containers:
+        - name: nginx-ingress-controller
+          image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.25.1
+          args:
+            - /nginx-ingress-controller
+            - --configmap=$(POD_NAMESPACE)/nginx-configuration
+            - --tcp-services-configmap=$(POD_NAMESPACE)/tcp-services
+            - --udp-services-configmap=$(POD_NAMESPACE)/udp-services
+            - --publish-service=$(POD_NAMESPACE)/ingress-nginx
+            - --annotations-prefix=nginx.ingress.kubernetes.io
+            - --enable-ssl-passthrough=true
+          securityContext:
+            allowPrivilegeEscalation: true
+            capabilities:
+              drop:
+                - ALL
+              add:
+                - NET_BIND_SERVICE
+            # www-data -> 33
+            runAsUser: 33
+          env:
+            - name: POD_NAME
+              valueFrom:
+                fieldRef:
+                  fieldPath: metadata.name
+            - name: POD_NAMESPACE
+              valueFrom:
+                fieldRef:
+                  fieldPath: metadata.namespace
+          ports:
+            - name: http
+              containerPort: 80
+            - name: https
+              containerPort: 443
+          livenessProbe:
+            failureThreshold: 3
+            httpGet:
+              path: /healthz
+              port: 10254
+              scheme: HTTP
+            initialDelaySeconds: 10
+            periodSeconds: 10
+            successThreshold: 1
+            timeoutSeconds: 10
+          readinessProbe:
+            failureThreshold: 3
+            httpGet:
+              path: /healthz
+              port: 10254
+              scheme: HTTP
+            periodSeconds: 10
+            successThreshold: 1
+            timeoutSeconds: 10
+
+---
+kind: Service
+apiVersion: v1
+metadata:
+  name: ingress-nginx
+  namespace: ingress-nginx
+  labels:
+    app.kubernetes.io/name: ingress-nginx
+    app.kubernetes.io/part-of: ingress-nginx
+spec:
+  externalTrafficPolicy: Local
+  type: LoadBalancer
+  selector:
+    app.kubernetes.io/name: ingress-nginx
+    app.kubernetes.io/part-of: ingress-nginx
+  ports:
+    - name: http
+      port: 80
+      targetPort: http
+    - name: https
+      port: 443
+      targetPort: https
+
+---
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: ingress-nginx
+  namespace: ingress-nginx
+  labels:
+    app.kubernetes.io/name: ingress-nginx
+    app.kubernetes.io/part-of: ingress-nginx
+spec:
+  type: NodePort
+  ports:
+    - name: http
+      port: 80
+      targetPort: 80
+      protocol: TCP
+    - name: https
+      port: 443
+      targetPort: 443
+      protocol: TCP
+  selector:
+    app.kubernetes.io/name: ingress-nginx
+    app.kubernetes.io/part-of: ingress-nginx
+
+---
+
index 9c23194..6dbd406 100644 (file)
@@ -15,4 +15,4 @@
 apiVersion: v1
 description: ONAP DCAE Gen2
 name: dcaegen2
-version: 5.0.0
+version: 6.0.0
index fcd62da..f10f2fc 100644 (file)
@@ -1,31 +1,48 @@
+# Copyright © 2019  AT&T 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.
+# 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.
 make-dcaegen2: make-dcae-bootstrap make-dcae-cloudify-manager make-dcae-config-binding-service make-dcae-healthcheck make-dcae-redis make-dcae-servicechange-handler make-dcae-inventory-api make-dcae-deployment-handler make-dcae-policy-handler make-dcae-dashboard
 
 make-dcae-bootstrap:
-       cd charts && helm dep up dcae-bootstrap && helm lint dcae-bootstrap
+       cd components && helm dep up dcae-bootstrap && helm lint dcae-bootstrap
 
 make-dcae-cloudify-manager:
-       cd charts && helm dep up dcae-cloudify-manager && helm lint dcae-cloudify-manager
+       cd components && helm dep up dcae-cloudify-manager && helm lint dcae-cloudify-manager
 
 make-dcae-config-binding-service:
-       cd charts && helm dep up dcae-config-binding-service && helm lint dcae-config-binding-service
+       cd components && helm dep up dcae-config-binding-service && helm lint dcae-config-binding-service
 
 make-dcae-healthcheck:
-       cd charts && helm dep up dcae-healthcheck && helm lint dcae-healthcheck
+       cd components && helm dep up dcae-healthcheck && helm lint dcae-healthcheck
 
 make-dcae-redis:
-       cd charts && helm dep up dcae-redis && helm lint dcae-redis
+       cd components && helm dep up dcae-redis && helm lint dcae-redis
 
 make-dcae-servicechange-handler:
-       cd charts && helm dep up dcae-servicechange-handler && helm lint dcae-servicechange-handler
+       cd components && helm dep up dcae-servicechange-handler && helm lint dcae-servicechange-handler
 
 make-dcae-inventory-api:
-       cd charts/dcae-servicechange-handler/charts  && helm dep up dcae-inventory-api && helm lint dcae-inventory-api
+       cd components && helm dep up dcae-inventory-api && helm lint dcae-inventory-api
 
 make-dcae-deployment-handler:
-       cd charts && helm dep up dcae-deployment-handler && helm lint dcae-deployment-handler
+       cd components && helm dep up dcae-deployment-handler && helm lint dcae-deployment-handler
 
 make-dcae-policy-handler:
-       cd charts && helm dep up dcae-policy-handler && helm lint dcae-policy-handler
+       cd components && helm dep up dcae-policy-handler && helm lint dcae-policy-handler
 
 make-dcae-dashboard:
-       cd charts && helm dep up dcae-dashboard && helm lint dcae-dashboard
+       cd components && helm dep up dcae-dashboard && helm lint dcae-dashboard
+
+clean:
+       @find . -type f -name '*.tgz' -delete
+       @find . -type f -name '*.lock' -delete
@@ -106,7 +106,7 @@ componentImages:
   tca: onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.1.2
   ves: onap/org.onap.dcaegen2.collectors.ves.vescollector:1.4.5
   snmptrap: onap/org.onap.dcaegen2.collectors.snmptrap:1.4.0
-  prh: onap/org.onap.dcaegen2.services.prh.prh-app-server:1.3.1
+  prh: onap/org.onap.dcaegen2.services.prh.prh-app-server:1.3.2
   hv_ves: onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main:1.3.0
 
 # Resource Limit flavor -By Default using small
diff --git a/kubernetes/dcaegen2/components/dcae-redis/templates/ingress.yaml b/kubernetes/dcaegen2/components/dcae-redis/templates/ingress.yaml
new file mode 100644 (file)
index 0000000..8f87c68
--- /dev/null
@@ -0,0 +1 @@
+{{ include "common.ingress" . }}
@@ -93,7 +93,15 @@ persistence:
 
 ingress:
   enabled: false
-
+  service:
+    - baseaddr: "dcaeredis"
+      name: "dcae-redis"
+      port: 6379
+    - baseaddr: "dcaeredisgossip"
+      name: "dcae-redis"
+      port: 16379
+  config:
+    ssl: "none"
 # Resource Limit flavor -By Default using small
 flavor: small
 # Segregation for Different environment (Small and Large)
index ad039c2..cd04d8a 100644 (file)
@@ -16,3 +16,44 @@ dependencies:
   - name: common
     version: ~5.x-0
     repository: '@local'
+  - name: dcae-bootstrap
+    version: ~6.x-0
+    repository: 'file://components/dcae-bootstrap'
+    condition: dcae-bootstrap.enabled
+  - name: dcae-cloudify-manager
+    version: ~6.x-0
+    repository: 'file://components/dcae-cloudify-manager'
+    condition: dcae-cloudify-manager.enabled
+  - name: dcae-config-binding-service
+    version: ~6.x-0
+    repository: 'file://components/dcae-config-binding-service'
+    condition: dcae-config-binding-service.enabled
+  - name: dcae-healthcheck
+    version: ~6.x-0
+    repository: 'file://components/dcae-healthcheck'
+    condition: dcae-healthcheck.enabled
+  - name: dcae-redis
+    version: ~6.x-0
+    repository: 'file://components/dcae-redis'
+    condition: dcae-redis.enabled
+  - name: dcae-servicechange-handler
+    version: ~6.x-0
+    repository: 'file://components/dcae-servicechange-handler'
+    condition: dcae-servicechange-handler.enabled
+  - name: dcae-inventory-api
+    version: ~6.x-0
+    repository: 'file://components/dcae-inventory-api'
+    condition: dcae-inventory-api.enabled
+  - name: dcae-deployment-handler
+    version: ~6.x-0
+    repository: 'file://components/dcae-deployment-handler'
+    condition: dcae-deployment-handler.enabled
+  - name: dcae-policy-handler
+    version: ~6.x-0
+    repository: 'file://components/dcae-policy-handler'
+    condition: dcae-policy-handler.enabled
+  - name: dcae-dashboard
+    version: ~6.x-0
+    repository: 'file://components/dcae-dashboard'
+    condition: dcae-dashboard.enabled
+
diff --git a/kubernetes/log/charts/log-elasticsearch/templates/ingress.yaml b/kubernetes/log/charts/log-elasticsearch/templates/ingress.yaml
new file mode 100644 (file)
index 0000000..8f87c68
--- /dev/null
@@ -0,0 +1 @@
+{{ include "common.ingress" . }}
index 11e3727..d43a66a 100644 (file)
@@ -94,7 +94,12 @@ service:
 
 ingress:
   enabled: false
-
+  service:
+    - baseaddr: "loges"
+      name: "log-es"
+      port: 9200
+  config:
+    ssl: "none"
 # Resource Limit flavor -By Default using small
 flavor: small
 # Segregation for Different environment (Small and Large)
diff --git a/kubernetes/log/charts/log-kibana/templates/ingress.yaml b/kubernetes/log/charts/log-kibana/templates/ingress.yaml
new file mode 100644 (file)
index 0000000..8f87c68
--- /dev/null
@@ -0,0 +1 @@
+{{ include "common.ingress" . }}
index 5132768..d69ab8e 100644 (file)
@@ -77,8 +77,15 @@ service:
   externalPort: 5601
   internalPort: 5601
   nodePort: 53
+
 ingress:
   enabled: false
+  service:
+    - baseaddr: "logkibana"
+      name: "log-kibana"
+      port: 5601
+  config:
+    ssl: "none"
 
 # Resource Limit flavor -By Default using small
 flavor: small
diff --git a/kubernetes/log/charts/log-logstash/templates/ingress.yaml b/kubernetes/log/charts/log-logstash/templates/ingress.yaml
new file mode 100644 (file)
index 0000000..8f87c68
--- /dev/null
@@ -0,0 +1 @@
+{{ include "common.ingress" . }}
index 246b812..a6e6c96 100644 (file)
@@ -74,6 +74,15 @@ service:
   internalPort2: 9600
 ingress:
   enabled: false
+  service:
+    - baseaddr: "logls"
+      name: "log-ls"
+      port: 5044
+    - baseaddr: "loglshttp"
+      name: "log-ls"
+      port: 9600
+  config:
+    ssl: "none"
 
 # Resource Limit flavor -By Default using small
 flavor: small
diff --git a/kubernetes/msb/charts/msb-consul/templates/ingress.yaml b/kubernetes/msb/charts/msb-consul/templates/ingress.yaml
new file mode 100644 (file)
index 0000000..8f87c68
--- /dev/null
@@ -0,0 +1 @@
+{{ include "common.ingress" . }}
index 3cb5c74..d116497 100644 (file)
@@ -49,7 +49,7 @@ readiness:
   periodSeconds: 10
 
 service:
-  type: NodePort
+  type: ClusterIP
   name: msb-consul
   externalPort: 8500
   internalPort: 8500
@@ -57,6 +57,12 @@ service:
 
 ingress:
   enabled: false
+  service:
+    - baseaddr: "msbconsul"
+      name: "msb-consul"
+      port: 8500
+  config:
+    ssl: "none"
 
 flavor: small
 
diff --git a/kubernetes/msb/charts/msb-discovery/templates/ingress.yaml b/kubernetes/msb/charts/msb-discovery/templates/ingress.yaml
new file mode 100644 (file)
index 0000000..8f87c68
--- /dev/null
@@ -0,0 +1 @@
+{{ include "common.ingress" . }}
index b471278..abb1277 100644 (file)
@@ -51,7 +51,7 @@ readiness:
   periodSeconds: 10
 
 service:
-  type: NodePort
+  type: ClusterIP
   name: msb-discovery
   externalPort: 10081
   internalPort: 10081
@@ -59,6 +59,12 @@ service:
 
 ingress:
   enabled: false
+  service:
+    - baseaddr: "msbdiscovery"
+      name: "msb-discovery"
+      port: 10081
+  config:
+    ssl: "none"
 
 # Resource Limit flavor -By Default using small
 flavor: small
diff --git a/kubernetes/msb/charts/msb-eag/templates/ingress.yaml b/kubernetes/msb/charts/msb-eag/templates/ingress.yaml
new file mode 100644 (file)
index 0000000..8f87c68
--- /dev/null
@@ -0,0 +1 @@
+{{ include "common.ingress" . }}
index 2055b21..bc5e661 100644 (file)
@@ -26,9 +26,6 @@ spec:
   type: {{ .Values.service.type }}
   ports:
     {{if eq .Values.service.type "NodePort" -}}
-    - port: {{ .Values.service.externalPort }}
-      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
-      name: http-{{ .Values.service.name }}
     - port: {{ .Values.service.externalPortHttps }}
       nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePortHttps }}
       name: https-{{ .Values.service.name }}
index e25fa28..535c135 100644 (file)
@@ -56,13 +56,18 @@ service:
   name: msb-eag
   externalPort: 80
   internalPort: 80
-  nodePort: 82
   externalPortHttps: 443
   internalPortHttps: 443
   nodePortHttps: 84
 
 ingress:
   enabled: false
+  service:
+    - baseaddr: "msbeag"
+      name: "msb-eag"
+      port: 443
+  config:
+    ssl: "redirect"
 
 # Resource Limit flavor -By Default using small
 flavor: small
diff --git a/kubernetes/msb/charts/msb-iag/templates/ingress.yaml b/kubernetes/msb/charts/msb-iag/templates/ingress.yaml
new file mode 100644 (file)
index 0000000..8f87c68
--- /dev/null
@@ -0,0 +1 @@
+{{ include "common.ingress" . }}
index 2055b21..bc5e661 100644 (file)
@@ -26,9 +26,6 @@ spec:
   type: {{ .Values.service.type }}
   ports:
     {{if eq .Values.service.type "NodePort" -}}
-    - port: {{ .Values.service.externalPort }}
-      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
-      name: http-{{ .Values.service.name }}
     - port: {{ .Values.service.externalPortHttps }}
       nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePortHttps }}
       name: https-{{ .Values.service.name }}
index 4aaeaea..6d1f7ac 100644 (file)
@@ -63,6 +63,12 @@ service:
 
 ingress:
   enabled: false
+  service:
+    - baseaddr: "msbiag"
+      name: "msb-iag"
+      port: 443
+  config:
+    ssl: "redirect"
 
 # Resource Limit flavor -By Default using small
 flavor: small
diff --git a/kubernetes/multicloud/charts/multicloud-lenovo/.helmignore b/kubernetes/multicloud/charts/multicloud-lenovo/.helmignore
deleted file mode 100644 (file)
index f0c1319..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# Patterns to ignore when building packages.
-# This supports shell glob matching, relative path matching, and
-# negation (prefixed with !). Only one pattern per line.
-.DS_Store
-# Common VCS dirs
-.git/
-.gitignore
-.bzr/
-.bzrignore
-.hg/
-.hgignore
-.svn/
-# Common backup files
-*.swp
-*.bak
-*.tmp
-*~
-# Various IDEs
-.project
-.idea/
-*.tmproj
diff --git a/kubernetes/multicloud/charts/multicloud-lenovo/resources/config/log/log.yml b/kubernetes/multicloud/charts/multicloud-lenovo/resources/config/log/log.yml
deleted file mode 100644 (file)
index 08a9348..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright (c) 2019 Lenovo 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.
-# 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.
-version: 1
-disable_existing_loggers: False
-
-loggers:
-    thinkcloud:
-      handlers: [thinkcloud_handler]
-      level: "DEBUG"
-      propagate: False
-    newton_base:
-      handlers: [thinkcloud_handler]
-      level: "DEBUG"
-      propagate: False
-    common:
-      handlers: [thinkcloud_handler]
-      level: "DEBUG"
-      propagate: False
-
-handlers:
-    thinkcloud_handler:
-        level: "DEBUG"
-        class: "logging.handlers.RotatingFileHandler"
-        filename: "/var/log/onap/multicloud/openstack/lenovo/thinkcloud.log"
-        formatter: "mdcFormat"
-        maxBytes: 1024*1024*50
-        backupCount: 10
-
-formatters:
-    standard:
-        format: "%(asctime)s|||||%(name)s||%(thread)||%(funcName)s||%(levelname)s||%(message)s"
-    mdcFormat:
-        format: "%(asctime)s|||||%(name)s||%(thread)s||%(funcName)s||%(levelname)s||%(message)s||||%(mdc)s \t"
-        mdcfmt: "{requestID} {invocationID} {serviceName} {serviceIP}"
-        datefmt: "%Y-%m-%d %H:%M:%S"
-        (): onaplogging.mdcformatter.MDCFormatter
diff --git a/kubernetes/multicloud/charts/multicloud-lenovo/templates/NOTES.txt b/kubernetes/multicloud/charts/multicloud-lenovo/templates/NOTES.txt
deleted file mode 100644 (file)
index 7df0413..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright (c) 2019 Lenovo
-#
-# 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.
-
-
-1. Get the application URL by running these commands:
-{{- if .Values.ingress.enabled }}
-{{- range .Values.ingress.hosts }}
-  http://{{ . }}
-{{- end }}
-{{- else if contains "NodePort" .Values.service.type }}
-  export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.name" . }})
-  export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
-  echo http://$NODE_IP:$NODE_PORT
-{{- else if contains "LoadBalancer" .Values.service.type }}
-     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
-           You can watch the status of by running 'kubectl get svc -w {{ include "common.name" . }}'
-  export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
-  echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
-{{- else if contains "ClusterIP" .Values.service.type }}
-  export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ include "common.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
-  echo "Visit http://127.0.0.1:8080 to use your application"
-  kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }}
-{{- end }}
diff --git a/kubernetes/multicloud/charts/multicloud-lenovo/templates/configmap.yaml b/kubernetes/multicloud/charts/multicloud-lenovo/templates/configmap.yaml
deleted file mode 100644 (file)
index f6eb87e..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-{{/*
-# Copyright (c) 2019 Lenovo
-# #
-# # 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
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-log-configmap
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-data:
-{{ tpl (.Files.Glob "resources/config/log/*").AsConfig . | indent 2 }}
diff --git a/kubernetes/multicloud/charts/multicloud-lenovo/templates/deployment.yaml b/kubernetes/multicloud/charts/multicloud-lenovo/templates/deployment.yaml
deleted file mode 100644 (file)
index 3be4d7c..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-{{/*
-# Copyright (c) 2019 Lenovo
-#
-# 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: extensions/v1beta1
-kind: Deployment
-metadata:
-  name: {{ include "common.fullname" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-spec:
-  replicas: {{ .Values.replicaCount }}
-  selector:
-    matchLabels:
-      app: {{ include "common.name" . }}
-  template:
-    metadata:
-      labels:
-        app: {{ include "common.name" . }}
-        release: {{ .Release.Name }}
-      name: {{ include "common.name" . }}
-      annotations:
-        sidecar.istio.io/inject: "{{.Values.istioSidecar}}"
-    spec:
-     containers:
-     - env:
-       - name: MSB_ADDR
-         value: "{{ .Values.config.msbgateway }}.{{ include "common.namespace" . }}"
-       - name: MSB_PORT
-         value: "{{ .Values.config.msbPort }}"
-       - name: AAI_ADDR
-         value: aai.{{ include "common.namespace" . }}
-       - name: AAI_PORT
-         value: "{{ .Values.config.aai.port }}"
-       - name: AAI_SCHEMA_VERSION
-         value: "{{ .Values.config.aai.schemaVersion }}"
-       - name: AAI_USERNAME
-         value: "{{ .Values.config.aai.username }}"
-       - name: AAI_PASSWORD
-         value: "{{ .Values.config.aai.password }}"
-       name: {{ include "common.name" . }}
-       volumeMounts:
-       - mountPath: /var/log/onap
-         name: lenovo-log
-       - mountPath: /opt/lenovo/thinkcloud/pub/config/log.yml
-         name: lenovo-logconfig
-         subPath: log.yml
-       resources:
-{{ include "common.resources" . | indent 12 }}
-       image: "{{ include "common.repository" . }}/{{ .Values.image }}"
-       imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-       ports:
-       - containerPort: {{ .Values.service.internalPort }}
-       # disable liveness probe when breakpoints set in debugger
-       # so K8s doesn't restart unresponsive container
-       {{ if .Values.liveness.enabled }}
-       livenessProbe:
-         httpGet:
-           path: /api/multicloud-thinkcloud/v1/swagger.json
-           port: {{ .Values.service.internalPort }}
-           scheme: HTTP
-         initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
-         periodSeconds: {{ .Values.liveness.periodSeconds }}
-         timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
-         successThreshold: {{ .Values.liveness.successThreshold }}
-         failureThreshold: {{ .Values.liveness.failureThreshold }}
-       {{ end }}
-     # side car containers
-     - image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
-       imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-       name: filebeat-onap
-       volumeMounts:
-       - mountPath: /usr/share/filebeat/filebeat.yml
-         name: filebeat-conf
-         subPath: filebeat.yml
-       - mountPath: /var/log/onap
-         name: lenovo-log
-       - mountPath: /usr/share/filebeat/data
-         name: lenovo-data-filebeat
-
-     volumes:
-     - name: lenovo-log
-       emptyDir: {}
-     - name: lenovo-data-filebeat
-       emptyDir: {}
-     - name: filebeat-conf
-       configMap:
-         name: multicloud-filebeat-configmap
-     - name: lenovo-logconfig
-       configMap:
-         name: {{ include "common.fullname" . }}-log-configmap
-     imagePullSecrets:
-     - name: "{{ include "common.namespace" . }}-docker-registry-key"
-     restartPolicy: Always
diff --git a/kubernetes/multicloud/charts/multicloud-lenovo/templates/service.yaml b/kubernetes/multicloud/charts/multicloud-lenovo/templates/service.yaml
deleted file mode 100644 (file)
index 43f735a..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-{{/*
-# Copyright (c) 2019 Lenovo
-# #
-# # 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
-kind: Service
-metadata:
-  name: {{ include "common.servicename" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-  annotations:
-    msb.onap.org/service-info: '[
-    {
-      "serviceName": "multicloud-thinkcloud",
-      "version": "v0",
-      "url": "/api/multicloud-thinkcloud/v0",
-      "protocol": "REST",
-      "port": "{{ .Values.service.externalPort }}",
-      "visualRange": "1"
-    },
-    {
-      "serviceName": "multicloud-thinkcloud",
-      "version": "v1",
-      "url": "/api/multicloud-thinkcloud/v1",
-      "protocol": "REST",
-      "port": "{{ .Values.service.externalPort }}",
-      "visualRange": "1"
-    }
-    ]'
-
-spec:
-  ports:
-  {{ if eq .Values.service.type "NodePort" -}}
-  - port: {{ .Values.service.externalPort }}
-    nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
-    name: {{ .Values.service.portName }}
-  {{- else -}}
-  - port: {{ .Values.service.externalPort }}
-    targetPort: {{ .Values.service.internalPort }}
-    name: {{ .Values.service.portName }}
-  {{- end }}
-  selector:
-    app: {{ include "common.name" . }}
-    release: {{ .Release.Name }}
-  type: {{ .Values.service.type }}
diff --git a/kubernetes/multicloud/charts/multicloud-lenovo/values.yaml b/kubernetes/multicloud/charts/multicloud-lenovo/values.yaml
deleted file mode 100644 (file)
index 953f355..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-# Copyright (c) 2019 Lenovo
-#
-# 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.
-
-#################################################################
-# Global configuration defaults.
-#################################################################
-global:
-  nodePortPrefix: 304
-
-#################################################################
-# Application configuration defaults.
-#################################################################
-# application image
-repository: nexus3.onap.org:10001
-image: onap/multicloud/openstack-lenovo:1.3.4
-pullPolicy: Always
-
-#Istio sidecar injection policy
-istioSidecar: true
-
-# application configuration
-config:
-  msbgateway: msb-iag
-  msbPort: 80
-  aai:
-    port: 8443
-    schemaVersion: v13
-    username: AAI
-    password: AAI
-
-service:
-  type: ClusterIP
-  name: multicloud-thinkcloud
-  portName: multicloud-thinkcloud
-  externalPort: 9010
-  internalPort: 9010
-  nodePort: 86
-
-# default number of instances
-replicaCount: 1
-
-nodeSelector: {}
-
-affinity: {}
-
-# probe configuration parameters
-liveness:
-  initialDelaySeconds: 30
-  periodSeconds: 10
-  timeoutSeconds: 10
-  successThreshold: 1
-  failureThreshold: 5
-  enabled: true
-
-ingress:
-  enabled: false
-
-# Resource Limit flavor -By Default using small
-flavor: small
-# Segregation for Different environment (Small and Large)
-resources:
-  small:
-    limits:
-      cpu: 1
-      memory: 4Gi
-    requests:
-      cpu: 10m
-      memory: 1Gi
-  large:
-    limits:
-      cpu: 2
-      memory: 8Gi
-    requests:
-      cpu: 20m
-      memory: 2Gi
-  unlimited: {}
index c4d65a7..f0c4b8e 100644 (file)
@@ -26,3 +26,8 @@ dependencies:
   - name: mariadb-galera
     version: ~5.x-0
     repository: '@local'
+    condition: global.mariadbGalera.localCluster
+  - name: mariadb-init
+    version: ~5.x-0
+    repository: '@local'
+    condition: not global.mariadbGalera.localCluster
index dc66319..4ba28b0 100644 (file)
@@ -30,7 +30,7 @@ spec:
       labels:
         app: {{ include "common.name" . }}
         release: {{ .Release.Name }}
-        name: {{ include "common.fullname" . }}
+      name: {{ include "common.fullname" . }}
     spec:
       containers:
         - name: {{ include "common.name" . }}
@@ -54,14 +54,14 @@ spec:
             periodSeconds: {{ .Values.readiness.periodSeconds }}
           env:
             - name: SPRING_DATASOURCE_URL
-              value: jdbc:mariadb://{{ index .Values "mariadb-galera" "service" "name" }}.{{ include "common.namespace" . }}:3306/{{ index .Values "mariadb-galera" "config" "mysqlDatabase" }}
+              value: jdbc:mariadb://{{ include "common.mariadbService" . }}:{{ include "common.mariadbPort" . }}/{{ index .Values "mariadb-galera" "config" "mysqlDatabase" }}
             - name: SPRING_DATASOURCE_USERNAME
               value: {{ index .Values "mariadb-galera" "config" "userName" }}
             - name: SPRING_DATASOURCE_PASSWORD
               valueFrom:
                 secretKeyRef:
-                  name: {{ template "common.fullname" . }}-secret
-                  key: db-user-password
+                  name: {{ include "common.mariadbSecret" . }}
+                  key: {{ include "common.mariadbSecretParam" . }}
             - name: SPRING_DATA_MONGODB_HOST
               value: {{ .Values.mongo.service.name }}.{{ include "common.namespace" . }}
             - name: SPRING_DATA_MONGODB_PORT
diff --git a/kubernetes/nbi/tests/deployment_test.yaml b/kubernetes/nbi/tests/deployment_test.yaml
new file mode 100644 (file)
index 0000000..7c8a1b0
--- /dev/null
@@ -0,0 +1,205 @@
+---
+suite: test deployment behavior
+templates:
+  - deployment.yaml
+tests:
+  - it: "should render with default values (global)"
+    asserts:
+      - isKind:
+          of: Deployment
+      - equal:
+          path: metadata.name
+          value: RELEASE-NAME-nbi
+      - equal:
+          path: metadata.namespace
+          value: NAMESPACE
+      - matchRegex:
+          path: metadata.labels.app
+          pattern: nbi
+      - matchRegex:
+          path: spec.template.metadata.labels.app
+          pattern: nbi
+      - equal:
+          path: spec.template.metadata.name
+          value: RELEASE-NAME-nbi
+      - equal:
+          path: spec.replicas
+          value: 1
+      - isNull:
+          path: spec.template.spec.nodeSelector
+      - isNull:
+          path: spec.template.spec.affinity
+
+  - it: "should render with default value (container)"
+    asserts:
+      - equal:
+          path: spec.template.spec.containers[0].name
+          value: nbi
+      - equal:
+          path: spec.template.spec.containers[0].image
+          value: nexus3.onap.org:10001/onap/externalapi/nbi:5.0.1
+      - equal:
+          path: spec.template.spec.containers[0].imagePullPolicy
+          value: IfNotPresent
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: SPRING_DATASOURCE_URL
+            value: jdbc:mariadb://mariadb-galera:3306/nbi
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: SPRING_DATASOURCE_USERNAME
+            value: rene
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: SPRING_DATASOURCE_PASSWORD
+            valueFrom:
+              secretKeyRef:
+                name: RELEASE-NAME-nbi-config
+                key: db-user-password
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: SPRING_DATA_MONGODB_HOST
+            value: nbi-mongohost.NAMESPACE
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: SPRING_DATA_MONGODB_PORT
+            value: "27017"
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: SPRING_DATA_MONGODB_DATABASE
+            value: ServiceOrderDB
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: ONAP_LCPCLOUDREGIONID
+            value: RegionOne
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: ONAP_TENANTID
+            value: 31047205ce114b60833b23e400d6a535
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: ONAP_CLOUDOWNER
+            value: CloudOwner
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: NBI_URL
+            value: http://nbi.NAMESPACE:8080/nbi/api/v4
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: SDC_HOST
+            value: https://sdc-be.NAMESPACE:8443
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: SDC_HEADER_ECOMPINSTANCEID
+            value: OOM
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: SDC_HEADER_AUTHORIZATION
+            value: Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: AAI_HOST
+            value: https://aai.NAMESPACE:8443
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: AAI_HEADER_AUTHORIZATION
+            value: Basic QUFJOkFBSQ==
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: SO_HOST
+            value: http://so.NAMESPACE:8080
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: DMAAP_HOST
+            value: http://message-router.NAMESPACE:3904
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: LOGGING_LEVEL_ORG_ONAP_NBI
+            value: INFO
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: MSB_ENABLED
+            value: "true"
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: MSB_DISCOVERY_HOST
+            value: msb-discovery.NAMESPACE
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: MSB_DISCOVERY_PORT
+            value: "10081"
+      - equal:
+          path: spec.template.spec.containers[0].livenessProbe
+          value:
+            initialDelaySeconds: 180
+            periodSeconds: 30
+            tcpSocket:
+              port: 8080
+      - equal:
+          path: spec.template.spec.containers[0].readinessProbe
+          value:
+            initialDelaySeconds: 185
+            periodSeconds: 30
+            tcpSocket:
+              port: 8080
+      - contains:
+          path: spec.template.spec.containers[0].ports
+          content:
+            containerPort: 8080
+      - equal:
+          path: spec.template.spec.containers[0].resources.limits.cpu
+          value: 1
+      - equal:
+          path: spec.template.spec.containers[0].resources.limits.memory
+          value: 2Gi
+      - equal:
+          path: spec.template.spec.containers[0].resources.requests.cpu
+          value: 100m
+      - equal:
+          path: spec.template.spec.containers[0].resources.requests.memory
+          value: 1Gi
+  - it: "should render when deciding to use local cluster (container)"
+    set:
+      global:
+        mariadbGalera:
+          localCluster: true
+    asserts:
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: SPRING_DATASOURCE_URL
+            value: jdbc:mariadb://nbi-galera:3306/nbi
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: SPRING_DATASOURCE_USERNAME
+            value: rene
+      - contains:
+          path: spec.template.spec.containers[0].env
+          content:
+            name: SPRING_DATASOURCE_PASSWORD
+            valueFrom:
+              secretKeyRef:
+                name: RELEASE-NAME-nbi-nbi-galera
+                key: user-password
index 28a5f8d..30f7d2d 100644 (file)
 global:
   nodePortPrefix: 302
   readinessRepository: oomk8s
-  readinessImage: readiness-check:1.1.0
+  readinessImage: readiness-check:2.0.2
   loggingRepository: docker.elastic.co
   loggingImage: beats/filebeat:5.5.0
+  mariadbGalera: &mariadbGalera
+    #This flag allows SO to instantiate its own mariadb-galera cluster
+    localCluster: false
+    service: mariadb-galera
+    internalPort: 3306
+    nameOverride: mariadb-galera
 
 subChartsOnly:
   enabled: true
@@ -29,7 +35,7 @@ subChartsOnly:
 # application image
 repository: nexus3.onap.org:10001
 image: onap/externalapi/nbi:5.0.1
-pullPolicy: Always
+pullPolicy: IfNotPresent
 sdc_authorization: Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=
 aai_authorization: Basic QUFJOkFBSQ==
 so_authorization:
@@ -45,7 +51,9 @@ config:
   openStackVNFTenantId: 31047205ce114b60833b23e400d6a535
 
 mariadb-galera:
-  config:
+  # '&mariadbConfig' means we "store" the values for  later use in the file
+  # with '*mariadbConfig' pointer.
+  config: &mariadbConfig
       userName: rene
       userPassword: lkjgklqsdareyhjujlnnbvfvdttuiukgpiokqbfsjdhfigquosegombvjfqhb
       mariadbRootPassword: dhqjdshjdsguryebvcnbvcvdsqghyjqgktgjjfhjfghbfs
@@ -54,11 +62,16 @@ mariadb-galera:
   service:
     name: nbi-galera
     portName: nbi-galera
+    internalPort: 3306
   replicaCount: 1
   persistence:
     enabled: true
     mountSubPath: nbi/maria/data
 
+mariadb-init:
+  config: *mariadbConfig
+  nameOverride: nbi-config
+
 mongo:
   nameOverride: nbi-mongo
   config:
index 8b186c0..70c4721 100755 (executable)
@@ -57,7 +57,7 @@ dependencies:
     repository: '@local'
     condition: contrib.enabled
   - name: dcaegen2
-    version: ~5.x-0
+    version: ~6.x-0
     repository: '@local'
     condition: dcaegen2.enabled
   - name: dmaap
index 672ae2e..af8456a 100755 (executable)
@@ -57,6 +57,12 @@ global:
   # flag to enable debugging - application support required
   debugEnabled: false
 
+  #Global ingress configuration
+  ingress:
+    enabled: false
+    virtualhost:
+        enabled: true
+        baseurl: "simpledemo.onap.org"
 #################################################################
 # Enable/disable and configure helm charts (ie. applications)
 # to customize the ONAP deployment.
@@ -169,4 +175,4 @@ vid:
 vnfsdk:
   enabled: false
 modeling:
-  enabled: false
+  enabled: false
\ No newline at end of file
index ef817f0..03b3a3c 100644 (file)
@@ -19,7 +19,7 @@
 global:
   nodePortPrefix: 302
   readinessRepository: oomk8s
-  readinessImage: readiness-check:2.0.0
+  readinessImage: readiness-check:2.0.2
 
 #################################################################
 # Application configuration defaults.
index 2f80892..2024bca 100644 (file)
@@ -19,7 +19,7 @@
 global:
   nodePortPrefix: 302
   readinessRepository: oomk8s
-  readinessImage: readiness-check:2.0.0
+  readinessImage: readiness-check:2.0.2
   ubuntuInitRepository: oomk8s
   ubuntuInitImage: ubuntu-init:1.0.0
   persistence: {}
index 22c7d8d..0b982fd 100644 (file)
@@ -17,7 +17,7 @@
 
 JVM_OPTIONS={{.Values.server.jvmOpts}}
 
-# SYSTEM software configuration 
+# SYSTEM software configuration
 
 POLICY_HOME=/opt/app/policy
 POLICY_LOGS=/var/log/onap/policy/pdpd
@@ -35,9 +35,9 @@ SNAPSHOT_REPOSITORY_URL=http://{{.Values.global.nexus.nameOverride}}:{{.Values.n
 RELEASE_REPOSITORY_ID=policy-nexus-releases
 RELEASE_REPOSITORY_URL=http://{{.Values.global.nexus.nameOverride}}:{{.Values.nexus.port}}/nexus/content/repositories/releases/
 
-# Relational (SQL) DB access 
+# Relational (SQL) DB access
 
-SQL_HOST={{.Values.global.mariadb.nameOverride}}
+SQL_HOST={{ .Values.global.mariadb.service.name }}
 
 # AAF
 
index bb21ae1..9f9ca35 100644 (file)
@@ -40,7 +40,7 @@ spec:
         - /root/ready.py
         args:
         - --container-name
-        - {{ .Values.global.mariadb.nameOverride }}
+        - {{ .Release.Name }}-galera-config
         - --container-name
         - {{ .Values.global.nexus.nameOverride }}
         env:
index b2e8257..fbb4211 100644 (file)
@@ -19,7 +19,7 @@
 global:
   nodePortPrefix: 302
   readinessRepository: oomk8s
-  readinessImage: readiness-check:2.0.0
+  readinessImage: readiness-check:2.0.2
   loggingRepository: docker.elastic.co
   loggingImage: beats/filebeat:5.5.0
   ubuntuImage: ubuntu:16.04
diff --git a/kubernetes/policy/charts/mariadb/Chart.yaml b/kubernetes/policy/charts/mariadb/Chart.yaml
deleted file mode 100644 (file)
index 59bd592..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-# Modifications Copyright © 2018 AT&T
-#
-# 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 Policy MariaDB Service
-name: mariadb
-version: 5.0.0
diff --git a/kubernetes/policy/charts/mariadb/requirements.yaml b/kubernetes/policy/charts/mariadb/requirements.yaml
deleted file mode 100644 (file)
index 05d49a8..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-# Modifications Copyright © 2018 AT&T
-#
-# 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: ~5.x-0
-    # local reference to common chart, as it is
-    # a part of this chart's package and will not
-    # be published independently to a repo (at this point)
-    repository: '@local'
diff --git a/kubernetes/policy/charts/mariadb/templates/NOTES.txt b/kubernetes/policy/charts/mariadb/templates/NOTES.txt
deleted file mode 100644 (file)
index 5d0107e..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright 2018 AT&T, Amdocs, Bell Canada 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.
-# 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.
-
-1. Get the application URL by running these commands:
-{{- if .Values.ingress.enabled }}
-{{- range .Values.ingress.hosts }}
-  http://{{ . }}
-{{- end }}
-{{- else if contains "NodePort" .Values.service.type }}
-  export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.name" . }})
-  export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
-  echo http://$NODE_IP:$NODE_PORT
-{{- else if contains "LoadBalancer" .Values.service.type }}
-     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
-           You can watch the status of by running 'kubectl get svc -w {{ include "common.name" . }}'
-  export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
-  echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
-{{- else if contains "ClusterIP" .Values.service.type }}
-  export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ template "common.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
-  echo "Visit http://127.0.0.1:8080 to use your application"
-  kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }}
-{{- end }}
diff --git a/kubernetes/policy/charts/mariadb/templates/configmap.yaml b/kubernetes/policy/charts/mariadb/templates/configmap.yaml
deleted file mode 100644 (file)
index 87dc6d3..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-# Modifications Copyright © 2018 AT&T
-#
-# 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
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-configmap
-  namespace: {{ include "common.namespace" . }}
-data:
-{{ tpl (.Files.Glob "resources/config/db.sh").AsConfig . | indent 2 }}
diff --git a/kubernetes/policy/charts/mariadb/templates/deployment.yaml b/kubernetes/policy/charts/mariadb/templates/deployment.yaml
deleted file mode 100644 (file)
index c64fb9a..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-# Modifications Copyright © 2018 AT&T
-#
-# 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: extensions/v1beta1
-kind: Deployment
-metadata:
-  name: {{ include "common.fullname" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-spec:
-  replicas: {{ .Values.replicaCount }}
-  template:
-    metadata:
-      labels:
-        app: {{ include "common.name" . }}
-        release: {{ .Release.Name }}
-    spec:
-      containers:
-        - name: {{ include "common.name" . }}
-          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
-          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-          ports:
-          - containerPort: {{ .Values.service.internalPort }}
-          # disable liveness probe when breakpoints set in debugger
-          # so K8s doesn't restart unresponsive container 
-          {{- if eq .Values.liveness.enabled true }}
-          args:
-          - --lower-case-table-names=1
-          - --wait_timeout=28800
-          livenessProbe:
-            tcpSocket:
-              port: {{ .Values.service.internalPort }}
-            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
-            periodSeconds: {{ .Values.liveness.periodSeconds }}
-          {{ end -}}
-          readinessProbe:
-            tcpSocket:
-              port: {{ .Values.service.internalPort }}
-            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
-            periodSeconds: {{ .Values.readiness.periodSeconds }}
-          env:
-          - name: MYSQL_ROOT_PASSWORD
-            valueFrom:
-              secretKeyRef:
-                name: {{ template "common.fullname" . }}-secret
-                key: db-root-password
-          - name: MYSQL_USER
-            value: policy_user
-          - name: MYSQL_PASSWORD
-            valueFrom:
-              secretKeyRef:
-                name: {{ template "common.fullname" . }}-secret
-                key: db-user-password
-          volumeMounts:
-          - mountPath: /etc/localtime
-            name: localtime
-            readOnly: true
-          - mountPath: /docker-entrypoint-initdb.d
-            name: mariadb-conf
-          - mountPath: /var/lib/mysql
-            name: mariadb-data
-          resources:
-{{ include "common.resources" . | indent 12 }}
-        {{- if .Values.nodeSelector }}
-        nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 10 }}
-        {{- end -}}
-        {{- if .Values.affinity }}
-        affinity:
-{{ toYaml .Values.affinity | indent 10 }}
-        {{- end }}
-      volumes:
-        - name: localtime
-          hostPath:
-            path: /etc/localtime
-        - name: mariadb-conf
-          configMap:
-            name: {{ include "common.fullname" . }}-configmap
-            defaultMode: 0755
-        - name: mariadb-data
-        {{- if .Values.persistence.enabled }}
-          persistentVolumeClaim:
-            claimName: {{ include "common.fullname" . }}
-        {{- else }}
-          emptyDir: {}
-        {{- end }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/policy/charts/mariadb/templates/pv.yaml b/kubernetes/policy/charts/mariadb/templates/pv.yaml
deleted file mode 100644 (file)
index bf372b3..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-{{/*
-# Copyright © 2017 Amdocs, Bell Canada
-# Modifications Copyright © 2018 AT&T
-#
-# 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.
-*/}}
-
-{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
-kind: PersistentVolume
-apiVersion: v1
-metadata:
-  name: {{ include "common.fullname" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
-    release: "{{ .Release.Name }}"
-    heritage: "{{ .Release.Service }}"
-    name: {{ include "common.fullname" . }}
-spec:
-  capacity:
-    storage: {{ .Values.persistence.size }}
-  accessModes:
-    - {{ .Values.persistence.accessMode }}
-  persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
-  hostPath:
-    path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
-{{- end -}}
diff --git a/kubernetes/policy/charts/mariadb/templates/pvc.yaml b/kubernetes/policy/charts/mariadb/templates/pvc.yaml
deleted file mode 100644 (file)
index 1deed4e..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-{{/*
-# Copyright © 2017 Amdocs, Bell Canada
-# Modifications Copyright © 2018 AT&T
-#
-# 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.
-*/}}
-
-{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
-kind: PersistentVolumeClaim
-apiVersion: v1
-metadata:
-  name: {{ include "common.fullname" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
-    release: "{{ .Release.Name }}"
-    heritage: "{{ .Release.Service }}"
-{{- if .Values.persistence.annotations }}
-  annotations:
-{{ toYaml .Values.persistence.annotations | indent 4 }}
-{{- end }}
-spec:
-  selector:
-    matchLabels:
-      name: {{ include "common.fullname" . }}
-  accessModes:
-    - {{ .Values.persistence.accessMode }}
-  resources:
-    requests:
-      storage: {{ .Values.persistence.size }}
-{{- if .Values.persistence.storageClass }}
-{{- if (eq "-" .Values.persistence.storageClass) }}
-  storageClassName: ""
-{{- else }}
-  storageClassName: "{{ .Values.persistence.storageClass }}"
-{{- end }}
-{{- end }}
-{{- end -}}
diff --git a/kubernetes/policy/charts/mariadb/templates/service.yaml b/kubernetes/policy/charts/mariadb/templates/service.yaml
deleted file mode 100644 (file)
index 9d5d13a..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-# Modifications Copyright © 2018-2019 AT&T
-#
-# 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
-kind: Service
-metadata:
-  name: {{ include "common.servicename" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-spec:
-  ports:
-    - port: {{ .Values.service.externalPort }}
-      targetPort: {{ .Values.service.internalPort }}
-      name: {{ .Values.service.portName }}
-  selector:
-    app: {{ include "common.name" . }}
-    release: {{ .Release.Name }}
diff --git a/kubernetes/policy/charts/mariadb/values.yaml b/kubernetes/policy/charts/mariadb/values.yaml
deleted file mode 100644 (file)
index 9b7102d..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-# Modifications Copyright © 2018-2019 AT&T
-#
-# 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.
-
-#################################################################
-# Global configuration defaults.
-#################################################################
-global:
-  nodePortPrefix: 302
-  persistence: {}
-
-#################################################################
-# Application configuration defaults.
-#################################################################
-# application image
-repository: nexus3.onap.org:10001
-image: mariadb:10.2.25
-pullPolicy: Always
-
-# flag to enable debugging - application support required
-debugEnabled: false
-
-# application configuration
-# Example:
-config:
-  mysqlRootPassword: secret
-  mysqlUserName: policy_user
-  mysqlPassword: policy_user
-# default number of instances
-replicaCount: 1
-
-nodeSelector: {}
-
-affinity: {}
-
-# probe configuration parameters
-liveness:
-  initialDelaySeconds: 120
-  periodSeconds: 10
-  # necessary to disable liveness probe when setting breakpoints
-  # in debugger so K8s doesn't restart unresponsive container
-  enabled: true
-
-readiness:
-  initialDelaySeconds: 120
-  periodSeconds: 10
-
-## Persist data to a persitent volume
-persistence:
-  enabled: true
-  volumeReclaimPolicy: Retain
-  accessMode: ReadWriteOnce
-  size: 2Gi
-  mountPath: /dockerdata-nfs
-  mountSubPath: mariadb/data
-
-service:
-  type: ClusterIP
-  name: policydb
-  portName: policydb
-  externalPort: 3306
-  internalPort: 3306
-
-ingress:
-  enabled: false
-
-# Resource Limit flavor -By Default using small
-flavor: small
-# Segregation for Different environment (Small and Large)
-resources:
-  small:
-    limits:
-      cpu: 1
-      memory: 2Gi
-    requests:
-      cpu: 10m
-      memory: 0.5Gi
-  large:
-    limits:
-      cpu: 2
-      memory: 4Gi
-    requests:
-      cpu: 20m
-      memory: 1Gi
-  unlimited: {}
index 20f4614..af5bb9e 100644 (file)
@@ -19,7 +19,7 @@
 global:
   nodePortPrefix: 302
   readinessRepository: oomk8s
-  readinessImage: readiness-check:2.0.0
+  readinessImage: readiness-check:2.0.2
   loggingRepository: docker.elastic.co
   loggingImage: beats/filebeat:5.5.0
 
index 397f850..8952ae8 100644 (file)
@@ -29,9 +29,9 @@
         "name": "PolicyProviderParameterGroup",
         "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl",
         "databaseDriver": "org.mariadb.jdbc.Driver",
-        "databaseUrl": "jdbc:mariadb://{{.Values.global.mariadb.nameOverride}}:3306/policyadmin",
-        "databaseUser": "policy_user",
-        "databasePassword": "cG9saWN5X3VzZXI=",
+        "databaseUrl": "jdbc:mariadb://{{ .Values.global.mariadb.service.name }}:{{ .Values.global.mariadb.service.internalPort }}/policyadmin",
+        "databaseUser": "{{ .Values.global.mariadb.config.userName }}",
+        "databasePassword": "{{ .Values.global.mariadb.config.userPassword | b64enc }}",
         "persistenceUnit": "PolicyMariaDb"
     }
 }
index b79c6bf..505ba89 100644 (file)
@@ -21,7 +21,7 @@ spec:
           - /root/ready.py
           args:
           - --container-name
-          - {{ .Values.global.mariadb.nameOverride }}
+          - {{ .Release.Name }}-galera-config
           env:
           - name: NAMESPACE
             valueFrom:
index 44e754b..5711044 100644 (file)
@@ -19,10 +19,10 @@ KEYSTORE_PASSWD=Pol1cy_0nap
 TRUSTSTORE_PASSWD=Pol1cy_0nap
 
 JDBC_DRIVER=org.mariadb.jdbc.Driver
-JDBC_URL=jdbc:mariadb://{{ .Values.global.mariadb.nameOverride }}:{{.Values.config.mariadbPort}}/onap_sdk?connectTimeout=30000&socketTimeout=60000&log=true&sessionVariables=max_statement_time=30
-JDBC_LOG_URL=jdbc:mariadb://{{ .Values.global.mariadb.nameOverride }}:{{.Values.config.mariadbPort}}/log?connectTimeout=30000&socketTimeout=60000&log=true&sessionVariables=max_statement_time=30
-JDBC_USER=policy_user
-JDBC_PASSWORD=policy_user
+JDBC_URL=jdbc:mariadb://{{ .Values.global.mariadb.service.name }}:{{ .Values.global.mariadb.service.internalPort }}/onap_sdk?connectTimeout=30000&socketTimeout=60000&log=true&sessionVariables=max_statement_time=30
+JDBC_LOG_URL=jdbc:mariadb://{{ .Values.global.mariadb.service.name }}:{{ .Values.global.mariadb.service.internalPort }}/log?connectTimeout=30000&socketTimeout=60000&log=true&sessionVariables=max_statement_time=30
+JDBC_USER={{ .Values.global.mariadb.config.userName }}
+JDBC_PASSWORD={{ .Values.global.mariadb.config.userPassword }}
 
 site_name=site_1
 fp_monitor_interval=30
index fc27782..052b6f2 100644 (file)
@@ -42,7 +42,7 @@ if [[ -f /opt/app/policy/etc/build.info ]]; then
        echo "Found existing installation, will not reinstall"
        . /opt/app/policy/etc/profile.d/env.sh
 
-else 
+else
        if [[ -d config ]]; then
                cp config/*.conf .
        fi
@@ -80,7 +80,7 @@ else
                # (which does nothing if the db is already up-to-date)
                dbuser=$(echo $(grep '^JDBC_USER=' base.conf | cut -f2 -d=))
                dbpw=$(echo $(grep '^JDBC_PASSWORD=' base.conf | cut -f2 -d=))
-               db_upgrade_remote.sh $dbuser $dbpw {{.Values.global.mariadb.nameOverride}}
+               db_upgrade_remote.sh $dbuser $dbpw {{.Values.global.mariadb.service.name}}
        fi
 
 fi
index a098560..57eacc5 100644 (file)
@@ -19,7 +19,7 @@
 global:
   nodePortPrefix: 302
   readinessRepository: oomk8s
-  readinessImage: readiness-check:2.0.0
+  readinessImage: readiness-check:2.0.2
   loggingRepository: docker.elastic.co
   loggingImage: beats/filebeat:5.5.0
 
@@ -30,7 +30,6 @@ debugEnabled: false
 config:
   logstashServiceName: log-ls
   logstashPort: 5044
-  mariadbPort: 3306
 
 # default number of instances
 replicaCount: 1
index a665c07..48065ae 100644 (file)
@@ -40,9 +40,9 @@
         "name": "PolicyProviderParameterGroup",
         "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl",
         "databaseDriver": "org.mariadb.jdbc.Driver",
-        "databaseUrl": "jdbc:mariadb://{{.Values.global.mariadb.nameOverride}}:3306/policyadmin",
-        "databaseUser": "policy_user",
-        "databasePassword": "cG9saWN5X3VzZXI=",
+        "databaseUrl": "jdbc:mariadb://{{ .Values.global.mariadb.service.name }}:{{ .Values.global.mariadb.service.internalPort }}/{{ .Values.global.mariadb.config.mysqlDatabase }}",
+        "databaseUser": "{{ .Values.global.mariadb.config.userName }}",
+        "databasePassword": "{{ .Values.global.mariadb.config.userPassword | b64enc }}",
         "persistenceUnit": "PolicyMariaDb"
     },
     "topicParameterGroup": {
index 3332f60..a3adfee 100644 (file)
@@ -21,7 +21,7 @@ spec:
         - /root/ready.py
         args:
         - --container-name
-        - {{ .Values.global.mariadb.nameOverride }}
+        - {{ .Values.global.mariadb.service.name }}
         env:
         - name: NAMESPACE
           valueFrom:
index 4483a1b..7fd8572 100644 (file)
@@ -16,7 +16,8 @@
 #  SPDX-License-Identifier: Apache-2.0
 #  ============LICENSE_END=========================================================
 {
-    "name": "XacmlPdpGroup",
+    "name": "XacmlPdpParameters",
+    "pdpGroup": "defaultGroup",
     "restServerParameters": {
         "host": "0.0.0.0",
         "port": 6969,
index be9a3fa..29feeb6 100644 (file)
@@ -48,6 +48,6 @@ xacml.pip.engines=count-recent-operations,get-operation-outcome
 # JPA Properties
 #
 javax.persistence.jdbc.driver=org.mariadb.jdbc.Driver
-javax.persistence.jdbc.url=jdbc:mariadb://{{ .Values.global.mariadb.nameOverride }}:3306/operationshistory
-javax.persistence.jdbc.user=policy_user
-javax.persistence.jdbc.password=cG9saWN5X3VzZXI=
+javax.persistence.jdbc.url=jdbc:mariadb://{{ .Values.global.mariadb.service.name }}:{{ .Values.global.mariadb.service.internalPort }}/operationshistory
+javax.persistence.jdbc.user={{ .Values.global.mariadb.config.userName }}
+javax.persistence.jdbc.password={{ .Values.global.mariadb.config.userPassword | b64enc }}
index da9b019..ced19b9 100644 (file)
@@ -21,7 +21,7 @@ spec:
         - /root/ready.py
         args:
         - --container-name
-        - {{ .Values.global.mariadb.nameOverride }}
+        - {{ .Release.Name }}-galera-config
         env:
         - name: NAMESPACE
           valueFrom:
index 05d49a8..589dfa4 100644 (file)
@@ -20,3 +20,6 @@ dependencies:
     # a part of this chart's package and will not
     # be published independently to a repo (at this point)
     repository: '@local'
+  - name: mariadb-galera
+    version: ~5.x-0
+    repository: '@local'
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 #!/bin/bash -xv
-
+mysql() { /usr/bin/mysql  -h ${MYSQL_HOST} -P ${MYSQL_USER} "$@"; };
 for db in support onap_sdk log migration operationshistory10 pooling policyadmin operationshistory
 do
        mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "CREATE DATABASE IF NOT EXISTS ${db};"
index bd1af39..8c804c3 100644 (file)
@@ -36,4 +36,11 @@ metadata:
   namespace: {{ include "common.namespace" . }}
 data:
 {{ tpl (.Files.Glob "resources/config/pe/*").AsConfig . | indent 2 }}
-
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-db-configmap
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/db.sh").AsConfig . | indent 2 }}
index 5feb374..355b8fc 100644 (file)
@@ -36,7 +36,7 @@ spec:
         - /root/ready.py
         args:
         - --container-name
-        - {{ .Values.global.mariadb.nameOverride }}
+        - {{ .Release.Name }}-galera-config
         env:
         - name: NAMESPACE
           valueFrom:
diff --git a/kubernetes/policy/templates/job.yaml b/kubernetes/policy/templates/job.yaml
new file mode 100644 (file)
index 0000000..9ed09e8
--- /dev/null
@@ -0,0 +1,77 @@
+# Copyright © 2018 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.
+
+apiVersion: batch/v1
+kind: Job
+metadata:
+  name: {{ .Release.Name }}-galera-config
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}-job
+    release: {{ .Release.Name }}
+spec:
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}-job
+        release: {{ .Release.Name }}
+    spec:
+      initContainers:
+#This container checks that all galera instances are up before initializing it.
+      - name: {{ include "common.name" . }}-readiness
+        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        command:
+        - /root/ready.py
+        - --container-name
+        - {{ index .Values "mariadb-galera" "service" "name" }}
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+      containers:
+      - name: {{ .Release.Name }}-galera-config
+        image: {{ .Values.mariadb_image }}
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        volumeMounts:
+        - mountPath: /dbcmd-config/db.sh
+          name: {{ include "common.fullname" . }}-config
+          subPath: db.sh
+        command:
+        - /bin/sh
+        args:
+        - -x
+        - /dbcmd-config/db.sh
+        env:
+        - name: MYSQL_ROOT_PASSWORD
+          valueFrom:
+            secretKeyRef:
+              name: {{ template "common.fullname" . }}-secret
+              key: db-root-password
+        - name: MYSQL_HOST
+          value: "{{ index .Values "mariadb-galera" "service" "name" }}"
+        - name: MYSQL_USER
+          value: "{{ index .Values "mariadb-galera" "config" "userName" }}"
+        - name: MYSQL_PORT
+          value: "{{ index .Values "mariadb-galera" "service" "internalPort" }}"
+      restartPolicy: Never
+      volumes:
+        - name: {{ include "common.fullname" . }}-config
+          configMap:
+            name: {{ include "common.fullname" . }}-db-configmap
+            items:
+              - key: db.sh
+                path: db.sh
similarity index 92%
rename from kubernetes/nbi/templates/secrets.yaml
rename to kubernetes/policy/templates/secrets.yaml
index ea6ae82..eb5b002 100644 (file)
@@ -1,4 +1,5 @@
-# Copyright © 2017 Amdocs, Bell Canada, Orange
+# Copyright © 2017 Amdocs, Bell Canada
+# Modifications Copyright © 2018 AT&T, Orange
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
index 3648647..ef0e6b1 100644 (file)
 global:
   nodePortPrefix: 302
   readinessRepository: oomk8s
-  readinessImage: readiness-check:2.0.0
+  readinessImage: readiness-check:2.0.2
   loggingRepository: docker.elastic.co
   loggingImage: beats/filebeat:5.5.0
   ubuntuImage: ubuntu:16.04
-  mariadb:
-    nameOverride: policydb
   pdp:
     nameOverride: pdp
   pap:
-    nameOverride: pap
+    nameOverride: policy
   drools:
     nameOverride: drools
   brmwgw:
     nameOverride: brmsgw
   nexus:
     nameOverride: nexus
+  mariadb:
+    # '&mariadbConfig' means we "store" the values for  later use in the file
+    # with '*mariadbConfig' pointer.
+    config: &mariadbConfig
+      userName: policy_user
+      userPassword: policy_user
+      mariadbRootPassword: secret
+      mysqlDatabase: policyadmin
+    service: &mariadbService
+      name: policy-mariadb
+      portName: mysql-policy
+      internalPort: 3306
 
 #################################################################
 # Application configuration defaults.
@@ -42,17 +52,16 @@ global:
 # application image
 repository: nexus3.onap.org:10001
 image: onap/policy-pe:1.5.2
+mariadb_image: library/mariadb:10
 pullPolicy: Always
 
 subChartsOnly:
   enabled: true
 
-nameOverride: pap
-
+pap:
+  nameOverride: pap
 pdp:
   nameOverride: pdp
-mariadb:
-  nameOverride: policydb
 drools:
   nameOverride: drools
 brmwgw:
@@ -101,6 +110,17 @@ service:
 ingress:
   enabled: false
 
+mariadb-galera:
+  # mariadb-galera.config and global.mariadb.config must be equals
+  config: *mariadbConfig
+  nameOverride: policy-mariadb
+  # mariadb-galera.service and global.mariadb.service must be equals
+  service: *mariadbService
+  replicaCount: 1
+  persistence:
+    enabled: true
+    mountSubPath: policy/maria/data
+
 # Resource Limit flavor -By Default using small
 flavor: small
 # Segregation for Different environment (Small and Large)
index 31450dc..6e38b49 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 31450dcb11d18b81098b43d0d0b7ecdb0d69e238
+Subproject commit 6e38b492acd3ec44a869055092399b6f18c659b8
index 5ae0799..4965d96 100644 (file)
@@ -27,7 +27,7 @@ global:
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/sdnc-dmaap-listener-image:1.7.4
+image: onap/sdnc-dmaap-listener-image:1.7.6
 pullPolicy: Always
 
 # flag to enable debugging - application support required
index 4140790..db7c63c 100644 (file)
@@ -27,7 +27,7 @@ global:
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/sdnc-ansible-server-image:1.7.4
+image: onap/sdnc-ansible-server-image:1.7.6
 pullPolicy: Always
 
 # flag to enable debugging - application support required
index e8d3743..7ff000e 100644 (file)
@@ -27,7 +27,7 @@ global:
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/admportal-sdnc-image:1.7.4
+image: onap/admportal-sdnc-image:1.7.6
 config:
   dbRootPassword: secretpassword
   dbSdnctlPassword: gamma
index cbbee96..b4b42fd 100644 (file)
@@ -27,7 +27,7 @@ global:
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/sdnc-ueb-listener-image:1.7.4
+image: onap/sdnc-ueb-listener-image:1.7.6
 pullPolicy: Always
 
 # flag to enable debugging - application support required
index 6ca69c6..cd83ab7 100644 (file)
@@ -32,7 +32,7 @@ global:
 # application images
 repository: nexus3.onap.org:10001
 pullPolicy: Always
-image: onap/sdnc-image:1.7.4
+image: onap/sdnc-image:1.7.6
 
 
 # flag to enable debugging - application support required
diff --git a/kubernetes/vid/charts/vid-mariadb-galera/Chart.yaml b/kubernetes/vid/charts/vid-mariadb-galera/Chart.yaml
deleted file mode 100644 (file)
index 0419147..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright © 2018 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.
-
-apiVersion: v1
-description: ONAP VID MariaDB Galera cluster
-name: vid_mariadb_galera
-version: 5.0.0
-keywords:
-  - mariadb
-  - mysql
-  - database
-  - sql
-  - galera
-  - cluster
\ No newline at end of file
diff --git a/kubernetes/vid/charts/vid-mariadb-galera/templates/NOTES.txt b/kubernetes/vid/charts/vid-mariadb-galera/templates/NOTES.txt
deleted file mode 100644 (file)
index c44fa89..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright © 2018 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.
-
-MariaDB-Galera service can be accessed via port 3306 on the following DNS name from within your cluster:
-{{ include "common.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local
-
-To connect to your database:
-
-1. Run a pod that you can use as a client:
-
-    kubectl run {{ include "common.fullname" . }}-client --rm --tty -i --image mariadb --command -- bash
-
-2. Connect using the mysql cli, then provide your password:
-    $ mysql -h {{ include "common.fullname" . }} {{- if .Values.mysqlRootPassword }} -p {{ .Values.mysqlRootPassword }}{{- end -}}
-
diff --git a/kubernetes/vid/charts/vid-mariadb-galera/templates/configmap.yaml b/kubernetes/vid/charts/vid-mariadb-galera/templates/configmap.yaml
deleted file mode 100644 (file)
index ba6adc0..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright © 2018 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.
-
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-confd
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-data:
-{{ tpl (.Files.Glob "resources/config/mariadb/conf.d/*").AsConfig . | indent 2 }}
----
-{{- if .Values.externalConfig }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-externalconfig
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-data:
-  my_extra.cnf: |-
-   [mysqld]
-   lower_case_table_names = 1
-
-#{{ toYaml .Values.externalConfig | indent 4 }}
-#{{- end -}}
diff --git a/kubernetes/vid/charts/vid-mariadb-galera/templates/pv.yaml b/kubernetes/vid/charts/vid-mariadb-galera/templates/pv.yaml
deleted file mode 100644 (file)
index f682196..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-{{/*
-# 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.
-*/}}
-
-{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
-kind: PersistentVolume
-apiVersion: v1
-metadata:
-  name: {{ include "common.fullname" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
-    release: "{{ .Release.Name }}"
-    heritage: "{{ .Release.Service }}"
-    name: {{ include "common.fullname" . }}
-spec:
-  capacity:
-    storage: {{ .Values.persistence.size}}
-  accessModes:
-    - {{ .Values.persistence.accessMode }}
-  persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
-  hostPath:
-    path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
-{{- end -}}
diff --git a/kubernetes/vid/charts/vid-mariadb-galera/templates/pvc.yaml b/kubernetes/vid/charts/vid-mariadb-galera/templates/pvc.yaml
deleted file mode 100644 (file)
index c3de6e8..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-{{/*
-# 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.
-*/}}
-
-{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
-kind: PersistentVolumeClaim
-apiVersion: v1
-metadata:
-  name: {{ include "common.fullname" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
-    release: "{{ .Release.Name }}"
-    heritage: "{{ .Release.Service }}"
-{{- if .Values.persistence.annotations }}
-  annotations:
-{{ toYaml .Values.persistence.annotations | indent 4 }}
-{{- end }}
-spec:
-  selector:
-    matchLabels:
-      name: {{ include "common.fullname" . }}
-  accessModes:
-    - {{ .Values.persistence.accessMode }}
-  resources:
-    requests:
-      storage: {{ .Values.persistence.size }}
-{{- if .Values.persistence.storageClass }}
-{{- if (eq "-" .Values.persistence.storageClass) }}
-  storageClassName: ""
-{{- else }}
-  storageClassName: "{{ .Values.persistence.storageClass }}"
-{{- end }}
-{{- end }}
-{{- end -}}
diff --git a/kubernetes/vid/charts/vid-mariadb-galera/templates/secrets.yaml b/kubernetes/vid/charts/vid-mariadb-galera/templates/secrets.yaml
deleted file mode 100644 (file)
index 233158f..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright © 2018 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.
-
-apiVersion: v1
-kind: Secret
-metadata:
-  name: {{ include "common.fullname" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
-    release: "{{ .Release.Name }}"
-    heritage: "{{ .Release.Service }}"
-type: Opaque
-data:
-  db-root-password: {{ .Values.config.mariadbRootPassword | b64enc | quote }}
-  user-password: {{ default "" .Values.config.userPassword | b64enc | quote }}
\ No newline at end of file
diff --git a/kubernetes/vid/charts/vid-mariadb-galera/templates/service.yaml b/kubernetes/vid/charts/vid-mariadb-galera/templates/service.yaml
deleted file mode 100644 (file)
index ae11a26..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright © 2018 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.
-
-apiVersion: v1
-kind: Service
-metadata:
-  annotations:
-    service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
-#  name: {{ include "common.servicename" . }}
-  name: {{ .Values.service.name }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.fullname" . }}
-    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
-    release: "{{ .Release.Name }}"
-    heritage: "{{ .Release.Service }}"
-spec:
-  ports:
-    - name: {{ .Values.service.portName }}
-      port: {{ .Values.service.internalPort }}
-  clusterIP: None
-  selector:
-    app: {{ include "common.fullname" . }}
diff --git a/kubernetes/vid/charts/vid-mariadb-galera/templates/statefulset.yaml b/kubernetes/vid/charts/vid-mariadb-galera/templates/statefulset.yaml
deleted file mode 100644 (file)
index e90b156..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-# Copyright © 2018 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.
-
-apiVersion: apps/v1beta1
-kind: StatefulSet
-metadata:
-  name: {{ include "common.fullname" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.fullname" . }}
-    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
-    release: "{{ .Release.Name }}"
-    heritage: "{{ .Release.Service }}"
-spec:
-#  serviceName: {{ include "common.fullname" . }}
-  serviceName: {{ .Values.service.name }}
-  replicas: {{ .Values.replicaCount }}
-  template:
-    metadata:
-      labels:
-        app: {{ include "common.fullname" . }}
-        release: {{ .Release.Name }}
-      annotations:
-        pod.alpha.kubernetes.io/initialized: "true"
-    spec:
-    {{- if .Values.nodeSelector }}
-      nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 8 }}
-    {{- end }}
-      volumes:
-      {{- if .Values.externalConfig }}
-        - name: config
-          configMap:
-            name: {{ include "common.fullname" . }}-externalconfig
-      {{- end}}
-        - name: localtime
-          hostPath:
-            path: /etc/localtime
-      imagePullSecrets:
-      - name: {{ include "common.namespace" . }}-docker-registry-key
-      containers:
-        - name: {{ include "common.fullname" . }}
-          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
-          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy | quote}}
-          env:
-            - name: POD_NAMESPACE
-              valueFrom:
-                fieldRef:
-                  apiVersion: v1
-                  fieldPath: metadata.namespace
-            - name: MYSQL_USER
-              value: {{ default "" .Values.config.userName | quote }}
-            - name: MYSQL_PASSWORD
-              valueFrom:
-                secretKeyRef:
-                  name: {{ template "common.fullname" . }}
-                  key: user-password
-            - name: MYSQL_DATABASE
-              value: {{ default "" .Values.config.mysqlDatabase | quote }}
-            - name: MYSQL_ROOT_PASSWORD
-              valueFrom:
-                secretKeyRef:
-                  name: {{ template "common.fullname" . }}
-                  key: db-root-password
-          ports:
-          - containerPort: {{ .Values.service.internalPort }}
-            name: {{ .Values.service.name }}
-          - containerPort: {{ .Values.service.sstPort }}
-            name: {{ .Values.service.sstName }}
-          - containerPort: {{ .Values.service.replicationPort }}
-            name: {{ .Values.service.replicationName }}
-          - containerPort: {{ .Values.service.istPort }}
-            name: {{ .Values.service.istName }}
-          readinessProbe:
-            exec:
-              command:
-              - /usr/share/container-scripts/mysql/readiness-probe.sh
-            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
-            periodSeconds: {{ .Values.readiness.periodSeconds }}
-      {{- if eq .Values.liveness.enabled true }}
-          livenessProbe:
-            exec:
-              command: ["mysqladmin", "ping"]
-            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
-            periodSeconds: {{ .Values.liveness.periodSeconds }}
-            timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
-      {{- end }}
-          resources:
-{{ include "common.resources" . | indent 12 }}
-          volumeMounts:
-        {{- if .Values.externalConfig }}
-          - mountPath: /etc/config
-            name: config
-        {{- end}}
-          - mountPath: /etc/localtime
-            name: localtime
-            readOnly: true
-{{- if .Values.persistence.enabled }}
-          - mountPath: /var/lib/mysql
-            name: {{ include "common.fullname" . }}-data
-            subPath: data
-      initContainers:
-        - name: mariadb-galera-prepare
-          image: "{{ include "common.repository" . }}/{{ .Values.imageInit }}"
-          command: ["sh", "-c", "chown -R 27:27 /var/lib/mysql"]
-          volumeMounts:
-            - name: {{ include "common.fullname" . }}-data
-              mountPath: /var/lib/mysql
-  volumeClaimTemplates:
-  - metadata:
-      name: {{ include "common.fullname" . }}-data
-      labels:
-        name: {{ include "common.fullname" . }}
-      annotations:
-  {{- if .Values.persistence.storageClass }}
-        volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }}
-  {{- else }}
-        volume.alpha.kubernetes.io/storage-class: default
-  {{- end }}
-    spec:
-      accessModes:
-      - {{ .Values.persistence.accessMode | quote }}
-      resources:
-        requests:
-          storage: {{ .Values.persistence.size | quote }}
-      selector:
-        matchLabels:
-          name: {{ include "common.fullname" . }}
-{{- end }}
diff --git a/kubernetes/vid/charts/vid-mariadb-galera/values.yaml b/kubernetes/vid/charts/vid-mariadb-galera/values.yaml
deleted file mode 100644 (file)
index e0da745..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-# Copyright © 2018 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.
-
-#################################################################
-# Global configuration defaults.
-#################################################################
-global:
-  nodePortPrefix: 302
-  persistence: {}
-  repository: nexus3.onap.org:10001
-
-
-#################################################################
-# Application configuration defaults.
-#################################################################
-
-#repository: mysql
-repository: nexus3.onap.org:10001
-image: adfinissygroup/k8s-mariadb-galera-centos:v004
-imageInit: busybox
-pullPolicy: IfNotPresent
-
-# application configuration
-config:
-  mariadbRootPassword: secretpassword
-#  userName: my-user
-#  userPassword: my-password
-#  mysqlDatabase: my-database
-  userName: vidadmin
-  userPassword: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
-  mysqlDatabase: vid_openecomp_epsdk
-
-
-# default number of instances in the StatefulSet
-replicaCount: 2
-
-nodeSelector: {}
-
-affinity: {}
-
-# probe configuration parameters
-liveness:
-  initialDelaySeconds: 30
-  periodSeconds: 10
-  timeoutSeconds: 5
-  # necessary to disable liveness probe when setting breakpoints
-  # in debugger so K8s doesn't restart unresponsive container
-  enabled: false
-
-readiness:
-  initialDelaySeconds: 15
-  periodSeconds: 10
-
-## Persist data to a persitent volume
-persistence:
-  enabled: false
-
-  ## A manually managed Persistent Volume and Claim
-  ## Requires persistence.enabled: true
-  ## If defined, PVC must be created manually before volume will be bound
-  # existingClaim:
-  volumeReclaimPolicy: Retain
-
-  ## database data Persistent Volume Storage Class
-  ## If defined, storageClassName: <storageClass>
-  ## If set to "-", storageClassName: "", which disables dynamic provisioning
-  ## If undefined (the default) or set to null, no storageClassName spec is
-  ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
-  ##   GKE, AWS & OpenStack)
-  ##
-  # storageClass: "-"
-  accessMode: ReadWriteOnce
-  size: 2Gi
-
-
-service:
-  internalPort: 3306
-  name: vid-galera
-  portName: vid-galera
-  sstPort: 4444
-  sstName: sst
-  replicationPort: 4567
-  replicationName: replication
-  istPort: 4568
-  istName: ist
-
-ingress:
-  enabled: false
-
-
-## 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: |-
-  lower_case_table_names = 1
-# Resource Limit flavor -By Default using small
-flavor: small
-# Segregation for Different environment (Small and Large)
-resources:
-  small:
-    limits:
-      cpu: 10m
-      memory: 1Gi
-    requests:
-      cpu: 10m
-      memory: 500Mi
-  large:
-    limits:
-      cpu: 20m
-      memory: 2Gi
-    requests:
-      cpu: 20m
-      memory: 1Gi
-  unlimited: {}
-# Name for mariadb-galera cluster - should be unique accross all projects or other clusters
-nameOverride: vid-mariadb-galera
-
-# DNS name for mariadb-galera cluster - should be unique accross all projects other clusters
-#dnsnameOverride: mariadb-galera
index 6a748be..6e5fe9d 100644 (file)
@@ -19,3 +19,6 @@ dependencies:
     # a part of this chart's package and will not
     # be published independently to a repo (at this point)
     repository: '@local'
+  - name: mariadb-galera
+    version: ~5.x-0
+    repository: '@local'
index 9221af7..2c6c5fa 100644 (file)
@@ -101,15 +101,18 @@ spec:
             - name: VID_UEB_URL_LIST
               value: message-router.{{ include "common.namespace" . }}
             - name: VID_MYSQL_HOST
-              value: "{{ .Values.config.vidmysqlhost }}"
+              value: {{ index .Values "mariadb-galera" "service" "name" }}
             - name: VID_MYSQL_PORT
-              value: "{{ .Values.config.vidmysqlport }}"
+              value: "{{ index .Values "mariadb-galera" "service" "internalPort" }}"
             - name: VID_MYSQL_DBNAME
-              value: "{{ .Values.config.vidmysqldbname }}"
+              value: {{ index .Values "mariadb-galera" "config" "mysqlDatabase" }}
             - name: VID_MYSQL_USER
-              value: "{{ .Values.config.vidmysqluser }}"
+              value: {{ index .Values "mariadb-galera" "config" "userName" }}
             - name: VID_MYSQL_PASS
-              value: "{{ .Values.config.vidmysqlpassword }}"
+              valueFrom:
+                secretKeyRef:
+                  name: {{ template "common.fullname" . }}-db
+                  key: db-user-password
               #valueFrom:
               #  secretKeyRef: {name: {{ include "common.fullname" . }}, key: vid-password}
             - name: VID_MYSQL_MAXCONNECTIONS
@@ -166,4 +169,3 @@ spec:
             name: {{ include "common.fullname" . }}-log-configmap
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"
-
index 5214e71..c2a1858 100644 (file)
@@ -34,11 +34,8 @@ spec:
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         command:
         - /root/ready.py
-{{- $fullname := include "common.fullname" . -}}
-{{- range $i,$t := until (int .Values.vid_mariadb_galera.replicaCount)}}
         - --container-name
-        - {{ $fullname }}-mariadb-galera-{{$i}}
-{{- end }}
+        - {{ index .Values "mariadb-galera" "service" "name" }}
         env:
         - name: NAMESPACE
           valueFrom:
@@ -63,13 +60,16 @@ spec:
         - /dbcmd-config/db_cmd.sh
         env:
         - name: MYSQL_PASSWORD
-          value: "{{ .Values.config.vidmysqlpassword }}"
+          valueFrom:
+            secretKeyRef:
+              name: {{ template "common.fullname" . }}-db
+              key: db-user-password
         - name: MYSQL_HOST
-          value: "{{ .Values.config.vidmysqlhost }}"
+          value: {{ index .Values "mariadb-galera" "service" "name" }}
         - name: MYSQL_USER
-          value: "{{ .Values.config.vidmysqluser }}"
+          value: {{ index .Values "mariadb-galera" "config" "userName" }}
         - name: MYSQL_PORT
-          value: "{{ .Values.config.vidmysqlport }}"
+          value: "{{ index .Values "mariadb-galera" "service" "internalPort" }}"
       restartPolicy: Never
       volumes:
         - name: {{ include "common.fullname" . }}-config
@@ -80,4 +80,3 @@ spec:
                 path: db_cmd.sh
               - key: vid-pre-init.sql
                 path: vid-pre-init.sql
-
index 222a3d5..e0c1992 100644 (file)
@@ -39,3 +39,18 @@ metadata:
 type: Opaque
 data:
 {{ tpl (.Files.Glob "resources/certs/*").AsSecrets . | indent 2 }}
+---
+apiVersion: v1
+kind: Secret
+metadata:
+  name: {{ include "common.fullname" . }}-db
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    release: "{{ .Release.Name }}"
+    heritage: "{{ .Release.Service }}"
+type: Opaque
+data:
+  db-user-password: {{ index .Values "mariadb-galera" "config" "userPassword" | b64enc | quote }}
+  db-root-password: {{ index .Values "mariadb-galera" "config" "mariadbRootPassword" | b64enc | quote }}
index 6100277..f20e58f 100644 (file)
@@ -18,7 +18,7 @@
 global:
   nodePortPrefix: 302
   readinessRepository: oomk8s
-  readinessImage: readiness-check:2.0.1
+  readinessImage: readiness-check:2.0.2
   loggingRepository: docker.elastic.co
   loggingImage: beats/filebeat:5.5.0
 
@@ -47,19 +47,28 @@ config:
   vidmsopass: OBF:1ih71i271vny1yf41ymf1ylz1yf21vn41hzj1icz
   msodme2serverurl: http://localhost:8081
   vidcontactuslink: https://todo_contact_us_link.com
-  vidmysqlhost: vid-galera
-  vidmysqlport: "3306"
-  vidmysqldbname: vid_openecomp_epsdk
-  vidmysqluser: vidadmin
   vidmysqlmaxconnections: "5"
   logstashServiceName: log-ls
   logstashPort: 5044
   roleaccesscentralized: remote
 
-# subchart configuration
-vid_mariadb_galera:
-#  nameOverride: vid-mariadb-galera
-  replicaCount: 1
+mariadb-galera:
+  config:
+    userName: vidadmin
+    userPassword: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
+    mariadbRootPassword: kjgsdhjqhawxvnbpoiawsfgjsqhsgjhjhdqihhjqdvcbxkjchizpw
+    mysqlDatabase: vid_openecomp_epsdk
+  nameOverride: vid-galera
+  service:
+    name: vid-galera
+    portName: mysql-vid
+    internalPort: "3306"
+  replicaCount: 3
+  persistence:
+    enabled: true
+    mountSubPath: vid/maria/data
+  externalConfig: |-
+    lower_case_table_names = 1
 
 # default number of instances
 replicaCount: 1
diff --git a/kubernetes/vnfsdk/templates/ingress.yaml b/kubernetes/vnfsdk/templates/ingress.yaml
new file mode 100644 (file)
index 0000000..8f87c68
--- /dev/null
@@ -0,0 +1 @@
+{{ include "common.ingress" . }}
index 2b6fd99..55f81ac 100644 (file)
@@ -113,3 +113,9 @@ service:
 
 ingress:
   enabled: false
+  service:
+    - baseaddr: "refrepo"
+      name: "refrepo"
+      port: 97
+  config:
+    ssl: "none"