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/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