Merge "synching up portal config again"
diff --git a/kubernetes/aai/templates/modelloader-deployment.yaml b/kubernetes/aai/templates/modelloader-deployment.yaml
index 3f2bda3..f800c44 100644
--- a/kubernetes/aai/templates/modelloader-deployment.yaml
+++ b/kubernetes/aai/templates/modelloader-deployment.yaml
@@ -53,7 +53,7 @@
           path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/model-loader/appconfig/"
       - name: filebeat-conf
         hostPath:
-          path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/log4j/filebeat.yml
+          path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
       - name: aai-model-loader-logs
         emptyDir: {}
       - name: aai-model-loader-filebeat
diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/aai-search-data-service-health.json b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/aai-search-data-service-health.json
index c74fe8a..b1877c7 100644
--- a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/aai-search-data-service-health.json
+++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/aai-search-data-service-health.json
@@ -18,7 +18,7 @@
       {
         "id": "search-data-service-availability",
         "name": "Search Data Service Availability",
-        "script": "curl -k  --cert /consul/config/bin/client-cert-onap.crt.pem --cert-type PEM --key /consul/config/bin/client-cert-onap.key.pem --key-type PEM https://search-data-service.onap-aai:9509/services/search-data-service/v1/jaxrsExample/jaxrs-services/echo/up 2>&1 | grep 'Up'",
+        "script": "curl -k  --cert /consul/config/certs/client-cert-onap.crt.pem --cert-type PEM --key /consul/config/bin/client-cert-onap.key.pem --key-type PEM https://search-data-service.onap-aai:9509/services/search-data-service/v1/jaxrsExample/jaxrs-services/echo/up 2>&1 | grep 'Up'",
         "interval": "15s"
       },
       {
diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/bin/client-cert-onap.crt.pem b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/certs/client-cert-onap.crt.pem
similarity index 100%
rename from kubernetes/config/docker/init/src/config/consul/consul-agent-config/bin/client-cert-onap.crt.pem
rename to kubernetes/config/docker/init/src/config/consul/consul-agent-config/certs/client-cert-onap.crt.pem
diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/bin/client-cert-onap.key.pem b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/certs/client-cert-onap.key.pem
similarity index 100%
rename from kubernetes/config/docker/init/src/config/consul/consul-agent-config/bin/client-cert-onap.key.pem
rename to kubernetes/config/docker/init/src/config/consul/consul-agent-config/certs/client-cert-onap.key.pem
diff --git a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/search-data-service-availability.sh b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/search-data-service-availability.sh
index e5cf5cf..fc0b04a 100755
--- a/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/search-data-service-availability.sh
+++ b/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/search-data-service-availability.sh
@@ -9,8 +9,8 @@
 INDEX_SCHEMA="{\"fields\":[{\"name\": \"field1\", \"data-type\": \"string\"}]}"
 
 
-SEARCH_CERT_FILE="/consul/config/client-cert-onap.crt.pem"
-SEARCH_KEY_FILE="/consul/config/client-cert-onap.key.pem"
+SEARCH_CERT_FILE="/consul/config/certs/client-cert-onap.crt.pem"
+SEARCH_KEY_FILE="/consul/config/certs/client-cert-onap.key.pem"
 
 
 ## Try to create an index via the Search Data Service API.
diff --git a/kubernetes/oneclick/deleteAll.bash b/kubernetes/oneclick/deleteAll.bash
index 2d5779e..cf293e4 100755
--- a/kubernetes/oneclick/deleteAll.bash
+++ b/kubernetes/oneclick/deleteAll.bash
@@ -5,11 +5,6 @@
 delete_namespace() {
   _NS=$1-$2
   kubectl delete namespace $_NS
-   printf "Waiting for namespace $_NS termination...\n"
-   while kubectl get namespaces $_NS > /dev/null 2>&1; do
-     sleep 2
-   done
-  printf "Namespace $_NS deleted.\n\n"
 }
 
 delete_service_account() {
@@ -25,6 +20,24 @@
   helm delete $1-$2 --purge
 }
 
+wait_terminate() {
+  printf "Waiting for namespaces termination...\n"
+  while true; do
+    declare -i _STATUS=0
+    for i in ${HELM_APPS[@]}; do
+      kubectl get namespaces $1-$i > /dev/null 2>&1
+      if [ "$?" -eq "0" ]; then
+        _STATUS=1
+        break
+      fi
+    done
+    if [ "$_STATUS" -eq "0" ]; then
+      break
+    fi
+    sleep 2
+  done
+}
+
 usage() {
   cat <<EOF
 Usage: $0 [PARAMs]
@@ -34,6 +47,7 @@
                       from the following choices:
                       sdc, aai ,mso, message-router, robot, vid, aaf, uui
                       sdnc, portal, policy, appc, multicloud, clamp, consul, vnfsdk
+-N                  : Do not wait for deletion of namespace and its objects
 EOF
 }
 
@@ -41,8 +55,9 @@
 NS=
 INCL_SVC=false
 APP=
+WAIT_TERMINATE=true
 
-while getopts ":n:u:s:a:" PARAM; do
+while getopts ":n:u:s:a:N" PARAM; do
   case $PARAM in
     u)
       usage
@@ -58,6 +73,9 @@
         exit 1
       fi
       ;;
+    N)
+      WAIT_TERMINATE=false
+      ;;
     ?)
       usage
       exit
@@ -85,5 +103,8 @@
 
 done
 
+if $WAIT_TERMINATE; then
+  wait_terminate $NS
+fi
 
 printf "\n********** Gone **********\n"