Add an ability to use existing configMap for Kustomize support

Change-Id: Id331042cf363d40ec3d8c0dfd0dfce90fe2dc0fb
diff --git a/omec/5g-control-plane/templates/configmap-common.yaml b/omec/5g-control-plane/templates/configmap-common.yaml
index 0b13efb..6697b08 100644
--- a/omec/5g-control-plane/templates/configmap-common.yaml
+++ b/omec/5g-control-plane/templates/configmap-common.yaml
@@ -4,6 +4,7 @@
 # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
 */}}
 
+{{- if not .Values.config.useExistingConfigMap -}}
 {{- $config := index .Values.config.commonCfgFiles "free5GC.conf" }}
 {{- if not (hasKey $config "db_uri") -}}
 {{- $_ := printf "%s/%s" .Values.config.mongodb.url .Values.config.mongodb.name | set $config "db_uri" -}}
@@ -21,3 +22,4 @@
   {{ $key }}: |-
 {{ toYaml $value | indent 4 }}
 {{- end }}
+{{- end }}