1. running smf executable in bash to catch the signal SIGTERM
2. default run mongodb in replicaSet mode
3. setting default value of managedByConfigPod to true

Change-Id: I928207d393853746312750360b5f8878c8105ba0
diff --git a/5g-control-plane/Chart.yaml b/5g-control-plane/Chart.yaml
index 7604d34..a8ff16c 100644
--- a/5g-control-plane/Chart.yaml
+++ b/5g-control-plane/Chart.yaml
@@ -10,15 +10,15 @@
 name: 5g-control-plane
 icon: https://guide.opencord.org/logos/cord.svg
 
-version: 0.8.9
+version: 0.8.10
 
 dependencies:
   - name: mongodb
-    version: 10.31.5
+    version: 13.6.4
     repository: https://charts.bitnami.com/bitnami
     condition: mongodb.deploy
   - name: kafka
-    version: 16.2.10
+    version: 20.0.4
     repository: https://charts.bitnami.com/bitnami
     condition: kafka.deploy
 
diff --git a/5g-control-plane/templates/bin/_smf-run.sh.tpl b/5g-control-plane/templates/bin/_smf-run.sh.tpl
index 63a123b..87f4df2 100644
--- a/5g-control-plane/templates/bin/_smf-run.sh.tpl
+++ b/5g-control-plane/templates/bin/_smf-run.sh.tpl
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # Copyright 2020-present Open Networking Foundation
 #
@@ -6,13 +6,14 @@
 
 set -xe
 
+IMGPATH={{ .Values.config.imagePath }}
 {{- if .Values.config.coreDump.enabled }}
 cp /free5gc/smf/smf /tmp/coredump/
 {{- end }}
 
-cd /free5gc
+cd $IMGPATH
 
 cat config/smfcfg.conf
 cat uerouting/uerouting.conf
 
-GOTRACEBACK=crash ./smf/smf -smfcfg config/smfcfg.conf -uerouting uerouting/uerouting.conf
+#GOTRACEBACK=crash ./smf/smf -smfcfg config/smfcfg.conf -uerouting uerouting/uerouting.conf
diff --git a/5g-control-plane/templates/deployment-smf.yaml b/5g-control-plane/templates/deployment-smf.yaml
index 28e6ee1..aa26944 100644
--- a/5g-control-plane/templates/deployment-smf.yaml
+++ b/5g-control-plane/templates/deployment-smf.yaml
@@ -53,7 +53,10 @@
       {{- end }}
         stdin: true
         tty: true
-        command: ["/free5gc/script/smf-run.sh"]
+        command: [ {{ .Values.config.imagePath }}/script/smf-run.sh ]
+        command: [ "/bin/bash", "-c" ]
+        args:
+        - "cat {{ .Values.config.imagePath }}/config/smfcfg.conf && GOTRACEBACK=crash {{ .Values.config.imagePath }}/smf/smf -smfcfg {{ .Values.config.imagePath }}/config/smfcfg.conf -uerouting {{ .Values.config.imagePath }}/uerouting/uerouting.conf"
         env:
         - name: GRPC_GO_LOG_VERBOSITY_LEVEL
           value: {{ .Values.config.grpc.golog_verbosity | quote }}
@@ -79,12 +82,12 @@
       {{- end }}
         volumeMounts:
         - name: run-script
-          mountPath: /free5gc/script/smf-run.sh
+          mountPath: {{ .Values.config.imagePath }}/script/smf-run.sh
           subPath: smf-run.sh
         - name: nf-config
-          mountPath: /free5gc/uerouting
+          mountPath: {{ .Values.config.imagePath }}/uerouting
         - name: nf-config
-          mountPath: /free5gc/config
+          mountPath: {{ .Values.config.imagePath }}/config
       {{- if .Values.config.coreDump.enabled }}
         - name: coredump
           mountPath: /tmp/coredump
diff --git a/5g-control-plane/values.yaml b/5g-control-plane/values.yaml
index 0c9823a..c476bc0 100644
--- a/5g-control-plane/values.yaml
+++ b/5g-control-plane/values.yaml
@@ -132,12 +132,12 @@
   serviceAccount:
     create: false
   #clusterDomain: cluster.local
-  #architecture: replicaset
-  #replicaCount: 3
+  architecture: replicaset
+  replicaCount: 1
 
 config:
   managedByConfigPod:      # config comes from helm by default, if enabled true, then discard
-    enabled: false         # helm chart config and use the config from config Pod
+    enabled: true          # helm chart config and use the config from config Pod
     syncUrl: ""            # Get the config from adapater in case control plane is down
   useExistingConfigMap: false
   imagePath: /free5gc
@@ -146,7 +146,7 @@
     path: /tmp/coredump
   mongodb:
     name: free5gc
-    url: mongodb://mongodb
+    url: mongodb://mongodb-arbiter-headless
   grpc:
     golog_verbosity: "99"
     severity: "info"
@@ -454,6 +454,7 @@
         configuration:
           amfDBName: sdcore_amf
           enableDBStore: false
+          enableNrfCaching: false
           debugProfilePort: 5001
           kafkaInfo:
             brokerUri: "kafka-headless"
@@ -595,6 +596,7 @@
         configuration:
           smfDBName: sdcore_smf
           enableDBStore: false
+          enableNrfCaching: false
           debugProfilePort: 5001
           kafkaInfo:
             brokerUri: "kafka-headless"
diff --git a/5g-test-apps/Chart.yaml b/5g-test-apps/Chart.yaml
index fbc9993..f70f2d8 100644
--- a/5g-test-apps/Chart.yaml
+++ b/5g-test-apps/Chart.yaml
@@ -8,10 +8,10 @@
 name: 5g-test-apps
 icon: https://guide.opencord.org/logos/cord.svg
 
-version: 0.2.2
+version: 0.2.3
 
 dependencies:
   - name: mongodb
-    version: 10.31.5
+    version: 13.6.4
     repository: https://charts.bitnami.com/bitnami
     condition: mongodb.deploy