initial sdcore-helm-charts update

Change-Id: I91788de083b0f906ce4b32ac226f616fb2647ef9
diff --git a/5g-control-plane/templates/NOTES.txt b/5g-control-plane/templates/NOTES.txt
new file mode 100644
index 0000000..fb2a925
--- /dev/null
+++ b/5g-control-plane/templates/NOTES.txt
@@ -0,0 +1,9 @@
+{{- /*
+
+# Copyright 2020-present Open Networking Foundation
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+*/ -}}
+
+Notes - Instructions to use 5g helm charts
diff --git a/5g-control-plane/templates/_helpers.tpl b/5g-control-plane/templates/_helpers.tpl
new file mode 100644
index 0000000..87f1ec6
--- /dev/null
+++ b/5g-control-plane/templates/_helpers.tpl
@@ -0,0 +1,115 @@
+{{- /*
+
+# Copyright 2020-present Open Networking Foundation
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+*/ -}}
+
+{{/*
+Renders a set of standardised labels
+*/}}
+{{- define "5g-control-plane.metadata_labels" -}}
+{{- $application := index . 0 -}}
+{{- $context := index . 1 -}}
+release: {{ $context.Release.Name }}
+app: {{ $application }}
+{{- end -}}
+
+{{/*
+Render the given template.
+*/}}
+{{- define "5g-control-plane.template" -}}
+{{- $name := index . 0 -}}
+{{- $context := index . 1 -}}
+{{- $last := base $context.Template.Name }}
+{{- $wtf := $context.Template.Name | replace $last $name -}}
+{{ include $wtf $context }}
+{{- end -}}
+
+{{/*
+Render ServiceAccount, Role, and RoleBinding required for kubernetes-entrypoint.
+*/}}
+{{- define "5g-control-plane.service_account" -}}
+{{- $context := index . 1 -}}
+{{- $saName := index . 0 -}}
+{{- $saNamespace := $context.Release.Namespace }}
+---
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: {{ $saName }}
+  namespace: {{ $saNamespace }}
+  labels:
+{{ tuple $saName $context | include "5g-control-plane.metadata_labels" | indent 4 }}
+---
+{{- if semverCompare ">=1.16-0" $context.Capabilities.KubeVersion.GitVersion }}
+apiVersion: rbac.authorization.k8s.io/v1
+{{- else }}
+apiVersion: rbac.authorization.k8s.io/v1beta1
+{{- end }}
+kind: RoleBinding
+metadata:
+  name: {{ $saName }}
+  namespace: {{ $saNamespace }}
+  labels:
+{{ tuple $saName $context | include "5g-control-plane.metadata_labels" | indent 4 }}
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: Role
+  name: {{ $saName }}
+subjects:
+  - kind: ServiceAccount
+    name: {{ $saName }}
+    namespace: {{ $saNamespace }}
+---
+{{- if semverCompare ">=1.16-0" $context.Capabilities.KubeVersion.GitVersion }}
+apiVersion: rbac.authorization.k8s.io/v1
+{{- else }}
+apiVersion: rbac.authorization.k8s.io/v1beta1
+{{- end }}
+kind: Role
+metadata:
+  name: {{ $saName }}
+  namespace: {{ $saNamespace }}
+  labels:
+{{ tuple $saName $context | include "5g-control-plane.metadata_labels" | indent 4 }}
+rules:
+  - apiGroups:
+      - ""
+      - extensions
+      - batch
+      - apps
+    verbs:
+      - get
+      - list
+      - patch
+    resources:
+      - statefulsets
+      - daemonsets
+      - jobs
+      - pods
+      - services
+      - endpoints
+      - configmaps
+{{- end -}}
+
+{{/*
+Render init container for coredump.
+*/}}
+{{- define "5g-control-plane.coredump_init" -}}
+{{- $pod := index . 0 -}}
+{{- $context := index . 1 -}}
+- name: {{ $pod }}-coredump-init
+  image: {{ $context.Values.images.tags.init | quote }}
+  imagePullPolicy: {{ $context.Values.images.pullPolicy }}
+  securityContext:
+    privileged: true
+    runAsUser: 0
+  command: ["bash", "-xc"]
+  args:
+    - echo '/tmp/coredump/core.%h.%e.%t' > /mnt/host-rootfs/proc/sys/kernel/core_pattern
+  volumeMounts:
+    - name: host-rootfs
+      mountPath: /mnt/host-rootfs
+{{- end -}}
diff --git a/5g-control-plane/templates/bin/_amf-run.sh.tpl b/5g-control-plane/templates/bin/_amf-run.sh.tpl
new file mode 100644
index 0000000..2a9d174
--- /dev/null
+++ b/5g-control-plane/templates/bin/_amf-run.sh.tpl
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# Copyright 2020-present Open Networking Foundation
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+set -xe
+
+{{- if .Values.config.coreDump.enabled }}
+cp /free5gc/amf/amf /tmp/coredump/
+{{- end }}
+
+cd /free5gc
+cat config/amfcfg.conf
+
+GOTRACEBACK=crash ./amf/amf -amfcfg config/amfcfg.conf
diff --git a/5g-control-plane/templates/bin/_ausf-run.sh.tpl b/5g-control-plane/templates/bin/_ausf-run.sh.tpl
new file mode 100644
index 0000000..0307aed
--- /dev/null
+++ b/5g-control-plane/templates/bin/_ausf-run.sh.tpl
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# Copyright 2020-present Open Networking Foundation
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+set -xe
+
+{{- if .Values.config.coreDump.enabled }}
+cp /free5gc/ausf/ausf /tmp/coredump/
+{{- end }}
+
+cd /free5gc
+cat config/ausfcfg.conf
+
+GOTRACEBACK=crash ./ausf/ausf -ausfcfg config/ausfcfg.conf
diff --git a/5g-control-plane/templates/bin/_nrf-run.sh.tpl b/5g-control-plane/templates/bin/_nrf-run.sh.tpl
new file mode 100644
index 0000000..7caa2e9
--- /dev/null
+++ b/5g-control-plane/templates/bin/_nrf-run.sh.tpl
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# Copyright 2020-present Open Networking Foundation
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+set -xe
+
+{{- if .Values.config.coreDump.enabled }}
+cp /free5gc/nrf/nrf /tmp/coredump/
+{{- end }}
+
+cd /free5gc
+
+cat config/nrfcfg.conf
+
+GOTRACEBACK=crash ./nrf/nrf -nrfcfg config/nrfcfg.conf
diff --git a/5g-control-plane/templates/bin/_nssf-run.sh.tpl b/5g-control-plane/templates/bin/_nssf-run.sh.tpl
new file mode 100644
index 0000000..2aae4a0
--- /dev/null
+++ b/5g-control-plane/templates/bin/_nssf-run.sh.tpl
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# Copyright 2020-present Open Networking Foundation
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+set -xe
+
+{{- if .Values.config.coreDump.enabled }}
+cp /free5gc/nssf/nssf /tmp/coredump/
+{{- end }}
+
+cd /free5gc
+
+cat config/nssfcfg.conf
+
+GOTRACEBACK=crash ./nssf/nssf -nssfcfg config/nssfcfg.conf
diff --git a/5g-control-plane/templates/bin/_pcf-run.sh.tpl b/5g-control-plane/templates/bin/_pcf-run.sh.tpl
new file mode 100644
index 0000000..9dfee3f
--- /dev/null
+++ b/5g-control-plane/templates/bin/_pcf-run.sh.tpl
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# Copyright 2020-present Open Networking Foundation
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+set -xe
+
+{{- if .Values.config.coreDump.enabled }}
+cp /free5gc/pcf/pcf /tmp/coredump/
+{{- end }}
+
+cd /free5gc
+
+cat config/pcfcfg.conf
+
+GOTRACEBACK=crash ./pcf/pcf -pcfcfg config/pcfcfg.conf
diff --git a/5g-control-plane/templates/bin/_smf-run.sh.tpl b/5g-control-plane/templates/bin/_smf-run.sh.tpl
new file mode 100644
index 0000000..aafc97c
--- /dev/null
+++ b/5g-control-plane/templates/bin/_smf-run.sh.tpl
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# Copyright 2020-present Open Networking Foundation
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+set -xe
+
+{{- if .Values.config.coreDump.enabled }}
+cp /free5gc/smf/smf /tmp/coredump/
+{{- end }}
+
+cd /free5gc
+
+cat config/smfcfg.conf
+cat uerouting/uerouting.conf
+
+GOTRACEBACK=crash ./smf/smf -smfcfg config/smfcfg.conf -uerouting uerouting/uerouting.conf
diff --git a/5g-control-plane/templates/bin/_udm-run.sh.tpl b/5g-control-plane/templates/bin/_udm-run.sh.tpl
new file mode 100644
index 0000000..a171cea
--- /dev/null
+++ b/5g-control-plane/templates/bin/_udm-run.sh.tpl
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# Copyright 2020-present Open Networking Foundation
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+set -xe
+
+{{- if .Values.config.coreDump.enabled }}
+cp /free5gc/udm/udm /tmp/coredump/
+{{- end }}
+
+cd /free5gc
+
+cat config/udmcfg.conf
+
+GOTRACEBACK=crash ./udm/udm -udmcfg config/udmcfg.conf
diff --git a/5g-control-plane/templates/bin/_udr-run.sh.tpl b/5g-control-plane/templates/bin/_udr-run.sh.tpl
new file mode 100644
index 0000000..900f72a
--- /dev/null
+++ b/5g-control-plane/templates/bin/_udr-run.sh.tpl
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# Copyright 2020-present Open Networking Foundation
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+set -xe
+
+{{- if .Values.config.coreDump.enabled }}
+cp /free5gc/udr/udr /tmp/coredump/
+{{- end }}
+
+cd /free5gc
+
+cat config/udrcfg.conf
+
+GOTRACEBACK=crash ./udr/udr -udrcfg config/udrcfg.conf
diff --git a/5g-control-plane/templates/bin/_webui-run.sh.tpl b/5g-control-plane/templates/bin/_webui-run.sh.tpl
new file mode 100644
index 0000000..5e91d50
--- /dev/null
+++ b/5g-control-plane/templates/bin/_webui-run.sh.tpl
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# Copyright 2020-present Open Networking Foundation
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+set -xe
+
+{{- if .Values.config.coreDump.enabled }}
+cp /free5gc/webconsole/webconsole /tmp/coredump/
+{{- end }}
+
+cd /free5gc
+
+cat config/webuicfg.conf
+
+GOTRACEBACK=crash ./webconsole/webconsole -webuicfg config/webuicfg.conf
diff --git a/5g-control-plane/templates/configmap-amf.yaml b/5g-control-plane/templates/configmap-amf.yaml
new file mode 100644
index 0000000..5747fed
--- /dev/null
+++ b/5g-control-plane/templates/configmap-amf.yaml
@@ -0,0 +1,40 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.amf.deploy }}
+
+{{- if not .Values.config.useExistingConfigMap -}}
+{{- $amfcfg := index .Values.config.amf.cfgFiles "amfcfg.conf" }}
+{{- $sbi := index $amfcfg.configuration "sbi" }}
+
+{{- if not (hasKey $sbi "port") -}}
+{{- $_ := .Values.config.amf.sbi.port | set $sbi "port" -}}
+{{- end }}
+
+{{- if not (hasKey $amfcfg "logger") -}}
+{{- $_ := .Values.config.logger | set $amfcfg "logger" -}}
+{{- end }}
+
+{{- end }}
+
+
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: amf
+  labels:
+{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+data:
+  amf-run.sh: |
+{{ tuple "bin/_amf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
+{{- if not .Values.config.useExistingConfigMap -}}
+{{- range $key, $value := .Values.config.amf.cfgFiles }}
+  {{ $key }}: |-
+{{ toYaml $value | indent 4 }}
+{{- end }}
+{{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/configmap-ausf.yaml b/5g-control-plane/templates/configmap-ausf.yaml
new file mode 100644
index 0000000..2a8a2b1
--- /dev/null
+++ b/5g-control-plane/templates/configmap-ausf.yaml
@@ -0,0 +1,39 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.ausf.deploy }}
+
+{{- if not .Values.config.useExistingConfigMap -}}
+{{- $ausfcfg := index .Values.config.ausf.cfgFiles "ausfcfg.conf" }}
+{{- $sbi := index $ausfcfg.configuration "sbi" }}
+
+{{- if not (hasKey $ausfcfg "logger") -}}
+{{- $_ := .Values.config.logger | set $ausfcfg "logger" -}}
+{{- end }}
+
+
+{{- if not (hasKey $sbi "port") -}}
+{{- $_ := .Values.config.ausf.sbi.port | set $sbi "port" -}}
+{{- end }}
+{{- end }}
+
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: ausf
+  labels:
+{{ tuple "ausf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+data:
+  ausf-run.sh: |
+{{ tuple "bin/_ausf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
+{{- if not .Values.config.useExistingConfigMap -}}
+{{- range $key, $value := .Values.config.ausf.cfgFiles }}
+  {{ $key }}: |-
+{{ toYaml $value | indent 4 }}
+{{- end }}
+{{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/configmap-nrf.yaml b/5g-control-plane/templates/configmap-nrf.yaml
new file mode 100644
index 0000000..ccb236b
--- /dev/null
+++ b/5g-control-plane/templates/configmap-nrf.yaml
@@ -0,0 +1,47 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.nrf.deploy }}
+
+{{- if not .Values.config.useExistingConfigMap -}}
+{{- $nrfcfg := index .Values.config.nrf.cfgFiles "nrfcfg.conf" }}
+{{- $config := index $nrfcfg "configuration" }}
+{{- $sbi := index $config "sbi" }}
+
+{{- if not (hasKey $config "MongoDBName") -}}
+{{- $_ := .Values.config.mongodb.name | set $config "MongoDBName" -}}
+{{- end }}
+
+{{- if not (hasKey $config "MongoDBUrl") -}}
+{{- $_ := .Values.config.mongodb.url | set $config "MongoDBUrl" -}}
+{{- end }}
+
+{{- if not (hasKey $nrfcfg "logger") -}}
+{{- $_ := .Values.config.logger | set $nrfcfg "logger" -}}
+{{- end }}
+
+{{- if not (hasKey $sbi "port") -}}
+{{- $_ := .Values.config.nrf.sbi.port | set $sbi "port" -}}
+{{- end }}
+{{- end }}
+
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: nrf
+  labels:
+{{ tuple "nrf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+data:
+  nrf-run.sh: |
+{{ tuple "bin/_nrf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
+{{- if not .Values.config.useExistingConfigMap -}}
+{{- range $key, $value := .Values.config.nrf.cfgFiles }}
+  {{ $key }}: |-
+{{ toYaml $value | indent 4 }}
+{{- end }}
+{{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/configmap-nssf.yaml b/5g-control-plane/templates/configmap-nssf.yaml
new file mode 100644
index 0000000..f6a8808
--- /dev/null
+++ b/5g-control-plane/templates/configmap-nssf.yaml
@@ -0,0 +1,38 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.nssf.deploy }}
+
+{{- if not .Values.config.useExistingConfigMap -}}
+{{- $nssfcfg := index .Values.config.nssf.cfgFiles "nssfcfg.conf" }}
+{{- $sbi := index $nssfcfg.configuration "sbi" }}
+
+{{- if not (hasKey $nssfcfg "logger") -}}
+{{- $_ := .Values.config.logger | set $nssfcfg "logger" -}}
+{{- end }}
+
+{{- if not (hasKey $sbi "port") -}}
+{{- $_ := .Values.config.nssf.sbi.port | set $sbi "port" -}}
+{{- end }}
+{{- end }}
+
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: nssf
+  labels:
+{{ tuple "nssf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+data:
+  nssf-run.sh: |
+{{ tuple "bin/_nssf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
+{{- if not .Values.config.useExistingConfigMap -}}
+{{- range $key, $value := .Values.config.nssf.cfgFiles }}
+  {{ $key }}: |-
+{{ toYaml $value | indent 4 }}
+{{- end }}
+{{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/configmap-pcf.yaml b/5g-control-plane/templates/configmap-pcf.yaml
new file mode 100644
index 0000000..dcb9bfe
--- /dev/null
+++ b/5g-control-plane/templates/configmap-pcf.yaml
@@ -0,0 +1,43 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.pcf.deploy }}
+
+{{- if not .Values.config.useExistingConfigMap -}}
+{{- $pcfcfg := index .Values.config.pcf.cfgFiles "pcfcfg.conf" }}
+{{- $sbi := index $pcfcfg.configuration "sbi" }}
+{{- $config := index $pcfcfg "configuration" }}
+
+{{- if not (hasKey $pcfcfg "logger") -}}
+{{- $_ := .Values.config.logger | set $pcfcfg "logger" -}}
+{{- end }}
+
+{{- if not (hasKey $sbi "port") -}}
+{{- $_ := .Values.config.pcf.sbi.port | set $sbi "port" -}}
+{{- end }}
+
+{{- if not (hasKey $config "mongodb") -}}
+{{- $_ := dict "name" .Values.config.mongodb.name "url" .Values.config.mongodb.url | set $config "mongodb" -}}
+{{- end }}
+{{- end }}
+
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: pcf
+  labels:
+{{ tuple "pcf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+data:
+  pcf-run.sh: |
+{{ tuple "bin/_pcf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
+{{- if not .Values.config.useExistingConfigMap -}}
+{{- range $key, $value := .Values.config.pcf.cfgFiles }}
+  {{ $key }}: |-
+{{ toYaml $value | indent 4 }}
+{{- end }}
+{{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/configmap-smf.yaml b/5g-control-plane/templates/configmap-smf.yaml
new file mode 100644
index 0000000..429499c
--- /dev/null
+++ b/5g-control-plane/templates/configmap-smf.yaml
@@ -0,0 +1,37 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.smf.deploy }}
+
+{{- if not .Values.config.useExistingConfigMap -}}
+{{- $smfcfg := index .Values.config.smf.cfgFiles "smfcfg.conf" }}
+{{- $sbi := index $smfcfg.configuration "sbi" }}
+
+{{- if not (hasKey $smfcfg "logger") -}}
+{{- $_ := .Values.config.logger | set $smfcfg "logger" -}}
+{{- end }}
+{{- if not (hasKey $sbi "port") -}}
+{{- $_ := .Values.config.smf.sbi.port | set $sbi "port" -}}
+{{- end }}
+{{- end }}
+
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: smf
+  labels:
+{{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+data:
+  smf-run.sh: |
+{{ tuple "bin/_smf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
+{{- if not .Values.config.useExistingConfigMap -}}
+{{- range $key, $value := .Values.config.smf.cfgFiles }}
+  {{ $key }}: |-
+{{ toYaml $value | indent 4 }}
+{{- end }}
+{{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/configmap-udm.yaml b/5g-control-plane/templates/configmap-udm.yaml
new file mode 100644
index 0000000..79f98c6
--- /dev/null
+++ b/5g-control-plane/templates/configmap-udm.yaml
@@ -0,0 +1,38 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.udm.deploy }}
+
+{{- if not .Values.config.useExistingConfigMap -}}
+{{- $udmcfg := index .Values.config.udm.cfgFiles "udmcfg.conf" }}
+{{- $sbi := index $udmcfg.configuration "sbi" }}
+
+{{- if not (hasKey $udmcfg "logger") -}}
+{{- $_ := .Values.config.logger | set $udmcfg "logger" -}}
+{{- end }}
+
+{{- if not (hasKey $sbi "port") -}}
+{{- $_ := .Values.config.udm.sbi.port | set $sbi "port" -}}
+{{- end }}
+{{- end }}
+
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: udm
+  labels:
+{{ tuple "udm" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+data:
+  udm-run.sh: |
+{{ tuple "bin/_udm-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
+{{- if not .Values.config.useExistingConfigMap -}}
+{{- range $key, $value := .Values.config.udm.cfgFiles }}
+  {{ $key }}: |-
+{{ toYaml $value | indent 4 }}
+{{- end }}
+{{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/configmap-udr.yaml b/5g-control-plane/templates/configmap-udr.yaml
new file mode 100644
index 0000000..8bbac77
--- /dev/null
+++ b/5g-control-plane/templates/configmap-udr.yaml
@@ -0,0 +1,43 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.udr.deploy }}
+
+{{- if not .Values.config.useExistingConfigMap -}}
+{{- $udrcfg := index .Values.config.udr.cfgFiles "udrcfg.conf" }}
+{{- $config := index $udrcfg "configuration" }}
+{{- $sbi := index $config "sbi" }}
+
+{{- if not (hasKey $config "mongodb") -}}
+{{- $_ := dict "name" .Values.config.mongodb.name "url" .Values.config.mongodb.url | set $config "mongodb" -}}
+{{- end }}
+
+{{- if not (hasKey $udrcfg "logger") -}}
+{{- $_ := .Values.config.logger | set $udrcfg "logger" -}}
+{{- end }}
+
+{{- if not (hasKey $sbi "port") -}}
+{{- $_ := .Values.config.udr.sbi.port | set $sbi "port" -}}
+{{- end }}
+{{- end }}
+
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: udr
+  labels:
+{{ tuple "udr" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+data:
+  udr-run.sh: |
+{{ tuple "bin/_udr-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
+{{- if not .Values.config.useExistingConfigMap -}}
+{{- range $key, $value := .Values.config.udr.cfgFiles }}
+  {{ $key }}: |-
+{{ toYaml $value | indent 4 }}
+{{- end }}
+{{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/configmap-webui.yaml b/5g-control-plane/templates/configmap-webui.yaml
new file mode 100644
index 0000000..07435ea
--- /dev/null
+++ b/5g-control-plane/templates/configmap-webui.yaml
@@ -0,0 +1,43 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.webui.deploy }}
+
+{{- if not .Values.config.useExistingConfigMap -}}
+{{- $webuicfg := index .Values.config.webui.cfgFiles "webuicfg.conf" }}
+{{- $config := index $webuicfg "configuration" }}
+
+{{- if not (hasKey $webuicfg "logger") -}}
+{{- $_ := .Values.config.logger | set $webuicfg "logger" -}}
+{{- end }}
+
+{{- if not (hasKey $config "managedByConfigPod") -}}
+{{- $_ := .Values.config.managedByConfigPod | set $config "managedByConfigPod" -}}
+{{- end }}
+
+{{- if not (hasKey $config "mongodb") -}}
+{{- $_ := dict "name" .Values.config.mongodb.name "url" .Values.config.mongodb.url | set $config "mongodb" -}}
+{{- end }}
+
+{{- end }}
+
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: webui
+  labels:
+{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+data:
+  webui-run.sh: |
+{{ tuple "bin/_webui-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
+{{- if not .Values.config.useExistingConfigMap -}}
+{{- range $key, $value := .Values.config.webui.cfgFiles }}
+  {{ $key }}: |-
+{{ toYaml $value | indent 4 }}
+{{- end }}
+{{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/deployment-amf.yaml b/5g-control-plane/templates/deployment-amf.yaml
new file mode 100644
index 0000000..05aa29c
--- /dev/null
+++ b/5g-control-plane/templates/deployment-amf.yaml
@@ -0,0 +1,103 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.amf.deploy }}
+{{ tuple "amf" . | include "5g-control-plane.service_account" }}
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: amf
+  labels:
+{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+spec:
+  replicas: 1
+  #serviceName: amf-headless
+  selector:
+    matchLabels:
+{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 6 }}
+  template:
+    metadata:
+      labels:
+{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 8 }}
+    {{- with .Values.config.amf.podAnnotations }}
+      annotations:
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+    spec:
+      serviceAccountName: amf
+    {{- if hasKey .Values.images "pullSecrets" }}
+      imagePullSecrets:
+{{ toYaml .Values.images.pullSecrets | indent 8 }}
+    {{- end }}
+      initContainers:
+      - name: wait-nrf-module
+        image: {{ .Values.images.tags.init | quote }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+        command: ['sh', '-c', 'until nslookup nrf; do echo waiting for nrf; sleep 4; done;']
+    {{- if .Values.config.coreDump.enabled }}
+{{ tuple "amf" . | include "5g-control-plane.coredump_init" | indent 6 }}
+    {{- end }}
+      containers:
+      - name: amf
+        image: {{ .Values.images.tags.amf }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+      {{- if .Values.config.coreDump.enabled }}
+        securityContext:
+          runAsUser: 0
+      {{- end }}
+        stdin: true
+        tty: true
+        command: ["/free5gc/script/amf-run.sh"]
+        env:
+        - name: GRPC_GO_LOG_VERBOSITY_LEVEL
+          value: {{ .Values.config.grpc.golog_verbosity | quote }}
+        - name: GRPC_GO_LOG_SEVERITY_LEVEL
+          value: {{ .Values.config.grpc.severity | quote }}
+        - name: GRPC_TRACE
+          value: {{ .Values.config.grpc.trace | quote }}
+        - name: GRPC_VERBOSITY
+          value: {{ .Values.config.grpc.verbosity | quote }}
+        - name: POD_IP
+          valueFrom:
+            fieldRef:
+              fieldPath: status.podIP
+      {{- if .Values.config.managedByConfigPod.enabled }}
+        - name: MANAGED_BY_CONFIG_POD 
+          value: "true"
+      {{- end }}
+      {{- if .Values.resources.enabled }}
+        resources:
+{{ toYaml .Values.resources.amf | indent 10 }}
+      {{- end }}
+        volumeMounts:
+        - name: run-script
+          mountPath: /free5gc/script/amf-run.sh
+          subPath: amf-run.sh
+        - name: amf-config
+          mountPath: /free5gc/config
+      {{- if .Values.config.coreDump.enabled }}
+        - name: coredump
+          mountPath: /tmp/coredump
+      {{- end }}
+      volumes:
+      - name: run-script
+        configMap:
+          name: amf
+          defaultMode: 493
+      - name: amf-config
+        configMap:
+          name: amf
+          defaultMode: 493
+    {{- if .Values.config.coreDump.enabled }}
+      - name: host-rootfs
+        hostPath:
+          path: /
+      - name: coredump
+        hostPath:
+          path: {{ .Values.config.coreDump.path }}
+    {{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/deployment-ausf.yaml b/5g-control-plane/templates/deployment-ausf.yaml
new file mode 100644
index 0000000..295e198
--- /dev/null
+++ b/5g-control-plane/templates/deployment-ausf.yaml
@@ -0,0 +1,105 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.ausf.deploy }}
+{{ tuple "ausf" . | include "5g-control-plane.service_account" }}
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: ausf
+  labels:
+{{ tuple "ausf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+spec:
+  replicas: 1
+  #serviceName: ausf-headless
+  selector:
+    matchLabels:
+{{ tuple "ausf" . | include "5g-control-plane.metadata_labels" | indent 6 }}
+  template:
+    metadata:
+      labels:
+{{ tuple "ausf" . | include "5g-control-plane.metadata_labels" | indent 8 }}
+    {{- with .Values.config.ausf.podAnnotations }}
+      annotations:
+        helm.sh/hook: pre-install
+        helm.sh/hook-weight: "5"
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+    spec:
+      serviceAccountName: ausf
+    {{- if hasKey .Values.images "pullSecrets" }}
+      imagePullSecrets:
+{{ toYaml .Values.images.pullSecrets | indent 8 }}
+    {{- end }}
+      initContainers:
+      - name: wait-ausf-module2
+        image: {{ .Values.images.tags.init | quote }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+        command: ['sh', '-c', 'until nslookup ausf; do echo waiting for ausf; sleep 4; done;']
+    {{- if .Values.config.coreDump.enabled }}
+{{ tuple "ausf" . | include "5g-control-plane.coredump_init" | indent 6 }}
+    {{- end }}
+      containers:
+      - name: ausf
+        image: {{ .Values.images.tags.ausf }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+      {{- if .Values.config.coreDump.enabled }}
+        securityContext:
+          runAsUser: 0
+      {{- end }}
+        stdin: true
+        tty: true
+        command: ["/free5gc/script/ausf-run.sh"]
+        env:
+        - name: GRPC_GO_LOG_VERBOSITY_LEVEL
+          value: {{ .Values.config.grpc.golog_verbosity | quote }}
+        - name: GRPC_GO_LOG_SEVERITY_LEVEL
+          value: {{ .Values.config.grpc.severity | quote }}
+        - name: GRPC_TRACE
+          value: {{ .Values.config.grpc.trace | quote }}
+        - name: GRPC_VERBOSITY
+          value: {{ .Values.config.grpc.verbosity | quote }}
+        - name: POD_IP
+          valueFrom:
+            fieldRef:
+              fieldPath: status.podIP
+      {{- if .Values.config.managedByConfigPod.enabled }}
+        - name: MANAGED_BY_CONFIG_POD 
+          value: "true"
+      {{- end }}
+      {{- if .Values.resources.enabled }}
+        resources:
+{{ toYaml .Values.resources.ausf | indent 10 }}
+      {{- end }}
+        volumeMounts:
+        - name: run-script
+          mountPath: /free5gc/script/ausf-run.sh
+          subPath: ausf-run.sh
+        - name: nf-config
+          mountPath: /free5gc/config
+      {{- if .Values.config.coreDump.enabled }}
+        - name: coredump
+          mountPath: /tmp/coredump
+      {{- end }}
+      volumes:
+      - name: run-script
+        configMap:
+          name: ausf
+          defaultMode: 493
+      - name: nf-config
+        configMap:
+          name: ausf
+          defaultMode: 493
+    {{- if .Values.config.coreDump.enabled }}
+      - name: host-rootfs
+        hostPath:
+          path: /
+      - name: coredump
+        hostPath:
+          path: {{ .Values.config.coreDump.path }}
+    {{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/deployment-nrf.yaml b/5g-control-plane/templates/deployment-nrf.yaml
new file mode 100644
index 0000000..80075f8
--- /dev/null
+++ b/5g-control-plane/templates/deployment-nrf.yaml
@@ -0,0 +1,101 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.nrf.deploy }}
+{{ tuple "nrf" . | include "5g-control-plane.service_account" }}
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: nrf
+  labels:
+{{ tuple "nrf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+spec:
+  replicas: 1
+  #serviceName: nrf-headless
+  selector:
+    matchLabels:
+{{ tuple "nrf" . | include "5g-control-plane.metadata_labels" | indent 6 }}
+  template:
+    metadata:
+      labels:
+{{ tuple "nrf" . | include "5g-control-plane.metadata_labels" | indent 8 }}
+    {{- with .Values.config.nrf.podAnnotations }}
+      annotations:
+        helm.sh/hook: pre-install
+        helm.sh/hook-weight: "2"
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+    spec:
+      serviceAccountName: nrf
+    {{- if hasKey .Values.images "pullSecrets" }}
+      imagePullSecrets:
+{{ toYaml .Values.images.pullSecrets | indent 8 }}
+    {{- end }}
+    {{- if .Values.config.coreDump.enabled }}
+      initContainers:
+{{ tuple "nrf" . | include "5g-control-plane.coredump_init" | indent 6 }}
+    {{- end }}
+      containers:
+      - name: nrf
+        image: {{ .Values.images.tags.nrf }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+      {{- if .Values.config.coreDump.enabled }}
+        securityContext:
+          runAsUser: 0
+      {{- end }}
+        stdin: true
+        tty: true
+        command: ["/free5gc/script/nrf-run.sh"]
+        env:
+        - name: GRPC_GO_LOG_VERBOSITY_LEVEL
+          value: {{ .Values.config.grpc.golog_verbosity | quote }}
+        - name: GRPC_GO_LOG_SEVERITY_LEVEL
+          value: {{ .Values.config.grpc.severity | quote }}
+        - name: GRPC_TRACE
+          value: {{ .Values.config.grpc.trace | quote }}
+        - name: GRPC_VERBOSITY
+          value: {{ .Values.config.grpc.verbosity | quote }}
+        - name: POD_IP
+          valueFrom:
+            fieldRef:
+              fieldPath: status.podIP
+      {{- if .Values.config.managedByConfigPod.enabled }}
+        - name: MANAGED_BY_CONFIG_POD 
+          value: "true"
+      {{- end }}
+      {{- if .Values.resources.enabled }}
+        resources:
+{{ toYaml .Values.resources.nrf | indent 10 }}
+      {{- end }}
+        volumeMounts:
+        - name: run-script
+          mountPath: /free5gc/script/nrf-run.sh
+          subPath: nrf-run.sh
+        - name: nf-config
+          mountPath: /free5gc/config
+      {{- if .Values.config.coreDump.enabled }}
+        - name: coredump
+          mountPath: /tmp/coredump
+      {{- end }}
+      volumes:
+      - name: run-script
+        configMap:
+          name: nrf
+          defaultMode: 493
+      - name: nf-config
+        configMap:
+          name: nrf
+          defaultMode: 493
+    {{- if .Values.config.coreDump.enabled }}
+      - name: host-rootfs
+        hostPath:
+          path: /
+      - name: coredump
+        hostPath:
+          path: {{ .Values.config.coreDump.path }}
+    {{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/deployment-nssf.yaml b/5g-control-plane/templates/deployment-nssf.yaml
new file mode 100644
index 0000000..2cce254
--- /dev/null
+++ b/5g-control-plane/templates/deployment-nssf.yaml
@@ -0,0 +1,103 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.nssf.deploy }}
+{{ tuple "nssf" . | include "5g-control-plane.service_account" }}
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: nssf
+  labels:
+{{ tuple "nssf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+spec:
+  replicas: 1
+  #serviceName: nssf-headless
+  selector:
+    matchLabels:
+{{ tuple "nssf" . | include "5g-control-plane.metadata_labels" | indent 6 }}
+  template:
+    metadata:
+      labels:
+{{ tuple "nssf" . | include "5g-control-plane.metadata_labels" | indent 8 }}
+    {{- with .Values.config.nssf.podAnnotations }}
+      annotations:
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+    spec:
+      serviceAccountName: nssf
+    {{- if hasKey .Values.images "pullSecrets" }}
+      imagePullSecrets:
+{{ toYaml .Values.images.pullSecrets | indent 8 }}
+    {{- end }}
+      initContainers:
+      - name: wait-nssf-module
+        image: {{ .Values.images.tags.init | quote }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+        command: ['sh', '-c', 'until nslookup nssf; do echo waiting for nssf; sleep 4; done;']
+    {{- if .Values.config.coreDump.enabled }}
+{{ tuple "nssf" . | include "5g-control-plane.coredump_init" | indent 6 }}
+    {{- end }}
+      containers:
+      - name: nssf
+        image: {{ .Values.images.tags.nssf }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+      {{- if .Values.config.coreDump.enabled }}
+        securityContext:
+          runAsUser: 0
+      {{- end }}
+        stdin: true
+        tty: true
+        command: ["/free5gc/script/nssf-run.sh"]
+        env:
+        - name: GRPC_GO_LOG_VERBOSITY_LEVEL
+          value: {{ .Values.config.grpc.golog_verbosity | quote }}
+        - name: GRPC_GO_LOG_SEVERITY_LEVEL
+          value: {{ .Values.config.grpc.severity | quote }}
+        - name: GRPC_TRACE
+          value: {{ .Values.config.grpc.trace | quote }}
+        - name: GRPC_VERBOSITY
+          value: {{ .Values.config.grpc.verbosity | quote }}
+        - name: POD_IP
+          valueFrom:
+            fieldRef:
+              fieldPath: status.podIP
+      {{- if .Values.config.managedByConfigPod.enabled }}
+        - name: MANAGED_BY_CONFIG_POD 
+          value: "true"
+      {{- end }}
+      {{- if .Values.resources.enabled }}
+        resources:
+{{ toYaml .Values.resources.nssf | indent 10 }}
+      {{- end }}
+        volumeMounts:
+        - name: run-script
+          mountPath: /free5gc/script/nssf-run.sh
+          subPath: nssf-run.sh
+        - name: nf-config
+          mountPath: /free5gc/config
+      {{- if .Values.config.coreDump.enabled }}
+        - name: coredump
+          mountPath: /tmp/coredump
+      {{- end }}
+      volumes:
+      - name: run-script
+        configMap:
+          name: nssf
+          defaultMode: 493
+      - name: nf-config
+        configMap:
+          name: nssf
+          defaultMode: 493
+    {{- if .Values.config.coreDump.enabled }}
+      - name: host-rootfs
+        hostPath:
+          path: /
+      - name: coredump
+        hostPath:
+          path: {{ .Values.config.coreDump.path }}
+    {{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/deployment-pcf.yaml b/5g-control-plane/templates/deployment-pcf.yaml
new file mode 100644
index 0000000..6829ffe
--- /dev/null
+++ b/5g-control-plane/templates/deployment-pcf.yaml
@@ -0,0 +1,103 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.pcf.deploy }}
+{{ tuple "pcf" . | include "5g-control-plane.service_account" }}
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: pcf
+  labels:
+{{ tuple "pcf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+spec:
+  replicas: 1
+  #serviceName: pcf-headless
+  selector:
+    matchLabels:
+{{ tuple "pcf" . | include "5g-control-plane.metadata_labels" | indent 6 }}
+  template:
+    metadata:
+      labels:
+{{ tuple "pcf" . | include "5g-control-plane.metadata_labels" | indent 8 }}
+    {{- with .Values.config.pcf.podAnnotations }}
+      annotations:
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+    spec:
+      serviceAccountName: pcf
+    {{- if hasKey .Values.images "pullSecrets" }}
+      imagePullSecrets:
+{{ toYaml .Values.images.pullSecrets | indent 8 }}
+    {{- end }}
+      initContainers:
+      - name: wait-pcf-module
+        image: {{ .Values.images.tags.init | quote }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+        command: ['sh', '-c', 'until nslookup pcf; do echo waiting for pcf; sleep 4; done;']
+    {{- if .Values.config.coreDump.enabled }}
+{{ tuple "pcf" . | include "5g-control-plane.coredump_init" | indent 6 }}
+    {{- end }}
+      containers:
+      - name: pcf
+        image: {{ .Values.images.tags.pcf }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+      {{- if .Values.config.coreDump.enabled }}
+        securityContext:
+          runAsUser: 0
+      {{- end }}
+        stdin: true
+        tty: true
+        command: ["/free5gc/script/pcf-run.sh"]
+        env:
+        - name: GRPC_GO_LOG_VERBOSITY_LEVEL
+          value: {{ .Values.config.grpc.golog_verbosity | quote }}
+        - name: GRPC_GO_LOG_SEVERITY_LEVEL
+          value: {{ .Values.config.grpc.severity | quote }}
+        - name: GRPC_TRACE
+          value: {{ .Values.config.grpc.trace | quote }}
+        - name: GRPC_VERBOSITY
+          value: {{ .Values.config.grpc.verbosity | quote }}
+        - name: POD_IP
+          valueFrom:
+            fieldRef:
+              fieldPath: status.podIP
+      {{- if .Values.config.managedByConfigPod.enabled }}
+        - name: MANAGED_BY_CONFIG_POD 
+          value: "true"
+      {{- end }}
+      {{- if .Values.resources.enabled }}
+        resources:
+{{ toYaml .Values.resources.pcf | indent 10 }}
+      {{- end }}
+        volumeMounts:
+        - name: run-script
+          mountPath: /free5gc/script/pcf-run.sh
+          subPath: pcf-run.sh
+        - name: nf-config
+          mountPath: /free5gc/config
+      {{- if .Values.config.coreDump.enabled }}
+        - name: coredump
+          mountPath: /tmp/coredump
+      {{- end }}
+      volumes:
+      - name: run-script
+        configMap:
+          name: pcf
+          defaultMode: 493
+      - name: nf-config
+        configMap:
+          name: pcf
+          defaultMode: 493
+    {{- if .Values.config.coreDump.enabled }}
+      - name: host-rootfs
+        hostPath:
+          path: /
+      - name: coredump
+        hostPath:
+          path: {{ .Values.config.coreDump.path }}
+    {{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/deployment-smf.yaml b/5g-control-plane/templates/deployment-smf.yaml
new file mode 100644
index 0000000..296bc50
--- /dev/null
+++ b/5g-control-plane/templates/deployment-smf.yaml
@@ -0,0 +1,107 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.smf.deploy }}
+{{ tuple "smf" . | include "5g-control-plane.service_account" }}
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: smf
+  labels:
+{{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+spec:
+  replicas: 1
+  #serviceName: smf-headless
+  selector:
+    matchLabels:
+{{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 6 }}
+  template:
+    metadata:
+      labels:
+{{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 8 }}
+    {{- with .Values.config.smf.podAnnotations }}
+      annotations:
+        helm.sh/hook: pre-install
+        helm.sh/hook-weight: "5"
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+    spec:
+      serviceAccountName: smf
+    {{- if hasKey .Values.images "pullSecrets" }}
+      imagePullSecrets:
+{{ toYaml .Values.images.pullSecrets | indent 8 }}
+    {{- end }}
+      initContainers:
+      - name: wait-smf-module
+        image: {{ .Values.images.tags.init | quote }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+        command: ['sh', '-c', 'until nslookup smf; do echo waiting for smf; sleep 4; done;']
+    {{- if .Values.config.coreDump.enabled }}
+{{ tuple "smf" . | include "5g-control-plane.coredump_init" | indent 6 }}
+    {{- end }}
+      containers:
+      - name: smf
+        image: {{ .Values.images.tags.smf }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+      {{- if .Values.config.coreDump.enabled }}
+        securityContext:
+          runAsUser: 0
+      {{- end }}
+        stdin: true
+        tty: true
+        command: ["/free5gc/script/smf-run.sh"]
+        env:
+        - name: GRPC_GO_LOG_VERBOSITY_LEVEL
+          value: {{ .Values.config.grpc.golog_verbosity | quote }}
+        - name: GRPC_GO_LOG_SEVERITY_LEVEL
+          value: {{ .Values.config.grpc.severity | quote }}
+        - name: GRPC_TRACE
+          value: {{ .Values.config.grpc.trace | quote }}
+        - name: GRPC_VERBOSITY
+          value: {{ .Values.config.grpc.verbosity | quote }}
+        - name: POD_IP
+          valueFrom:
+            fieldRef:
+              fieldPath: status.podIP
+      {{- if .Values.config.managedByConfigPod.enabled }}
+        - name: MANAGED_BY_CONFIG_POD 
+          value: "true"
+      {{- end }}
+      {{- if .Values.resources.enabled }}
+        resources:
+{{ toYaml .Values.resources.smf | indent 10 }}
+      {{- end }}
+        volumeMounts:
+        - name: run-script
+          mountPath: /free5gc/script/smf-run.sh
+          subPath: smf-run.sh
+        - name: nf-config
+          mountPath: /free5gc/uerouting
+        - name: nf-config
+          mountPath: /free5gc/config
+      {{- if .Values.config.coreDump.enabled }}
+        - name: coredump
+          mountPath: /tmp/coredump
+      {{- end }}
+      volumes:
+      - name: run-script
+        configMap:
+          name: smf
+          defaultMode: 493
+      - name: nf-config
+        configMap:
+          name: smf
+          defaultMode: 493
+    {{- if .Values.config.coreDump.enabled }}
+      - name: host-rootfs
+        hostPath:
+          path: /
+      - name: coredump
+        hostPath:
+          path: {{ .Values.config.coreDump.path }}
+    {{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/deployment-udm.yaml b/5g-control-plane/templates/deployment-udm.yaml
new file mode 100644
index 0000000..2714ef0
--- /dev/null
+++ b/5g-control-plane/templates/deployment-udm.yaml
@@ -0,0 +1,109 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.udm.deploy }}
+{{ tuple "udm" . | include "5g-control-plane.service_account" }}
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: udm
+  labels:
+{{ tuple "udm" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+spec:
+  replicas: 1
+  #serviceName: udm-headless
+  selector:
+    matchLabels:
+{{ tuple "udm" . | include "5g-control-plane.metadata_labels" | indent 6 }}
+  template:
+    metadata:
+      labels:
+{{ tuple "udm" . | include "5g-control-plane.metadata_labels" | indent 8 }}
+    {{- with .Values.config.udm.podAnnotations }}
+      annotations:
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+    spec:
+      serviceAccountName: udm
+    {{- if hasKey .Values.images "pullSecrets" }}
+      imagePullSecrets:
+{{ toYaml .Values.images.pullSecrets | indent 8 }}
+    {{- end }}
+      initContainers:
+      - name: wait-udm-module
+        image: {{ .Values.images.tags.init | quote }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+        command: ['sh', '-c', 'until nslookup udm; do echo waiting for udm; sleep 4; done;']
+      - name: wait-udr-module
+        image: {{ .Values.images.tags.init | quote }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+        command: ['sh', '-c', 'until nslookup udr; do echo waiting for udr; sleep 4; done;']
+    {{- if .Values.config.coreDump.enabled }}
+{{ tuple "udm" . | include "5g-control-plane.coredump_init" | indent 6 }}
+    {{- end }}
+      containers:
+      - name: udm
+        image: {{ .Values.images.tags.udm }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+      {{- if .Values.config.coreDump.enabled }}
+        securityContext:
+          runAsUser: 0
+      {{- end }}
+        stdin: true
+        tty: true
+        command: ["/free5gc/script/udm-run.sh"]
+        env:
+        - name: GRPC_GO_LOG_VERBOSITY_LEVEL
+          value: {{ .Values.config.grpc.golog_verbosity | quote }}
+        - name: GRPC_GO_LOG_SEVERITY_LEVEL
+          value: {{ .Values.config.grpc.severity | quote }}
+        - name: GRPC_TRACE
+          value: {{ .Values.config.grpc.trace | quote }}
+        - name: GRPC_VERBOSITY
+          value: {{ .Values.config.grpc.verbosity | quote }}
+        - name: POD_IP
+          valueFrom:
+            fieldRef:
+              fieldPath: status.podIP
+      {{- if .Values.config.managedByConfigPod.enabled }}
+        - name: MANAGED_BY_CONFIG_POD 
+          value: "true"
+      {{- end }}
+      {{- if .Values.resources.enabled }}
+        resources:
+{{ toYaml .Values.resources.udm | indent 10 }}
+      {{- end }}
+        volumeMounts:
+        - name: run-script
+          mountPath: /free5gc/script/udm-run.sh
+          subPath: udm-run.sh
+        - name: nf-config
+          mountPath: /free5gc/config
+      {{- if .Values.config.coreDump.enabled }}
+        - name: coredump
+          mountPath: /tmp/coredump
+      {{- end }}
+      volumes:
+      - name: run-script
+        configMap:
+          name: udm
+          defaultMode: 493
+      - name: nf-config
+        configMap:
+          name: udm
+          defaultMode: 493
+      - name: config-dir
+        emptyDir: {}
+    {{- if .Values.config.coreDump.enabled }}
+      - name: host-rootfs
+        hostPath:
+          path: /
+      - name: coredump
+        hostPath:
+          path: {{ .Values.config.coreDump.path }}
+    {{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/deployment-udr.yaml b/5g-control-plane/templates/deployment-udr.yaml
new file mode 100644
index 0000000..abe6e64
--- /dev/null
+++ b/5g-control-plane/templates/deployment-udr.yaml
@@ -0,0 +1,103 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.udr.deploy }}
+{{ tuple "udr" . | include "5g-control-plane.service_account" }}
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: udr
+  labels:
+{{ tuple "udr" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+spec:
+  replicas: 1
+  #serviceName: udr-headless
+  selector:
+    matchLabels:
+{{ tuple "udr" . | include "5g-control-plane.metadata_labels" | indent 6 }}
+  template:
+    metadata:
+      labels:
+{{ tuple "udr" . | include "5g-control-plane.metadata_labels" | indent 8 }}
+    {{- with .Values.config.udr.podAnnotations }}
+      annotations:
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+    spec:
+      serviceAccountName: udr
+    {{- if hasKey .Values.images "pullSecrets" }}
+      imagePullSecrets:
+{{ toYaml .Values.images.pullSecrets | indent 8 }}
+    {{- end }}
+      initContainers:
+      - name: wait-udr-module
+        image: {{ .Values.images.tags.init | quote }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+        command: ['sh', '-c', 'until nslookup udr; do echo waiting for udr; sleep 4; done;']
+    {{- if .Values.config.coreDump.enabled }}
+{{ tuple "udr" . | include "5g-control-plane.coredump_init" | indent 6 }}
+    {{- end }}
+      containers:
+      - name: udr
+        image: {{ .Values.images.tags.udr }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+      {{- if .Values.config.coreDump.enabled }}
+        securityContext:
+          runAsUser: 0
+      {{- end }}
+        stdin: true
+        tty: true
+        command: ["/free5gc/script/udr-run.sh"]
+        env:
+        - name: GRPC_GO_LOG_VERBOSITY_LEVEL
+          value: {{ .Values.config.grpc.golog_verbosity | quote }}
+        - name: GRPC_GO_LOG_SEVERITY_LEVEL
+          value: {{ .Values.config.grpc.severity | quote }}
+        - name: GRPC_TRACE
+          value: {{ .Values.config.grpc.trace | quote }}
+        - name: GRPC_VERBOSITY
+          value: {{ .Values.config.grpc.verbosity | quote }}
+        - name: POD_IP
+          valueFrom:
+            fieldRef:
+              fieldPath: status.podIP
+      {{- if .Values.config.managedByConfigPod.enabled }}
+        - name: MANAGED_BY_CONFIG_POD 
+          value: "true"
+      {{- end }}
+      {{- if .Values.resources.enabled }}
+        resources:
+{{ toYaml .Values.resources.udr | indent 10 }}
+      {{- end }}
+        volumeMounts:
+        - name: run-script
+          mountPath: /free5gc/script/udr-run.sh
+          subPath: udr-run.sh
+        - name: nf-config
+          mountPath: /free5gc/config
+      {{- if .Values.config.coreDump.enabled }}
+        - name: coredump
+          mountPath: /tmp/coredump
+      {{- end }}
+      volumes:
+      - name: run-script
+        configMap:
+          name: udr
+          defaultMode: 493
+      - name: nf-config
+        configMap:
+          name: udr
+          defaultMode: 493
+    {{- if .Values.config.coreDump.enabled }}
+      - name: host-rootfs
+        hostPath:
+          path: /
+      - name: coredump
+        hostPath:
+          path: {{ .Values.config.coreDump.path }}
+    {{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/deployment-webui.yaml b/5g-control-plane/templates/deployment-webui.yaml
new file mode 100644
index 0000000..c71becb
--- /dev/null
+++ b/5g-control-plane/templates/deployment-webui.yaml
@@ -0,0 +1,96 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.webui.deploy }}
+{{ tuple "webui" . | include "5g-control-plane.service_account" }}
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: webui
+  labels:
+{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 6 }}
+  template:
+    metadata:
+      labels:
+{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 8 }}
+    {{- with .Values.config.webui.podAnnotations }}
+      annotations:
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+    spec:
+      serviceAccountName: webui
+    {{- if hasKey .Values.images "pullSecrets" }}
+      imagePullSecrets:
+{{ toYaml .Values.images.pullSecrets | indent 8 }}
+    {{- end }}
+      initContainers:
+      - name: wait-webui-module
+        image: {{ .Values.images.tags.init | quote }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+        command: ['sh', '-c', 'until nslookup webui; do echo waiting for webui; sleep 4; done;']
+    {{- if .Values.config.coreDump.enabled }}
+{{ tuple "webui" . | include "5g-control-plane.coredump_init" | indent 6 }}
+    {{- end }}
+      containers:
+      - name: webui
+        image: {{ .Values.images.tags.webui }}
+        env:
+        - name: GRPC_GO_LOG_VERBOSITY_LEVEL
+          value: {{ .Values.config.grpc.golog_verbosity | quote }}
+        - name: GRPC_GO_LOG_SEVERITY_LEVEL
+          value: {{ .Values.config.grpc.severity | quote }}
+        - name: GRPC_TRACE
+          value: {{ .Values.config.grpc.trace | quote }}
+        - name: GRPC_VERBOSITY
+          value: {{ .Values.config.grpc.verbosity | quote }}
+        - name: CONFIGPOD_DEPLOYMENT
+          value: "5G"
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+      {{- if .Values.config.coreDump.enabled }}
+        securityContext:
+          runAsUser: 0
+      {{- end }}
+        stdin: true
+        tty: true
+        command: ["/free5gc/script/webui-run.sh"]
+      {{- if .Values.resources.enabled }}
+        resources:
+{{ toYaml .Values.resources.webui | indent 10 }}
+      {{- end }}
+        volumeMounts:
+        - name: run-script
+          mountPath: /free5gc/script/webui-run.sh
+          subPath: webui-run.sh
+        - name: nf-config
+          mountPath: /free5gc/config
+      {{- if .Values.config.coreDump.enabled }}
+        - name: coredump
+          mountPath: /tmp/coredump
+      {{- end }}
+      volumes:
+      - name: run-script
+        configMap:
+          name: webui
+          defaultMode: 493
+      - name: nf-config
+        configMap:
+          name: webui
+          defaultMode: 493
+    {{- if .Values.config.coreDump.enabled }}
+      - name: host-rootfs
+        hostPath:
+          path: /
+      - name: coredump
+        hostPath:
+          path: {{ .Values.config.coreDump.path }}
+    {{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/ingress-webui.yaml b/5g-control-plane/templates/ingress-webui.yaml
new file mode 100644
index 0000000..b41c736
--- /dev/null
+++ b/5g-control-plane/templates/ingress-webui.yaml
@@ -0,0 +1,26 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.webui.ingress.enabled }}
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+  name: webui
+  labels:
+{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+spec:
+  rules:
+    - host: {{ .Values.config.webui.ingress.hostname }}
+      http:
+        paths:
+          - path: {{ .Values.config.webui.ingress.path }}
+            pathType: {{ .Values.config.webui.ingress.pathType }}
+            backend:
+              service:
+                name: webui
+                port:
+                  number: {{ .Values.config.webui.urlport.port }}
+{{- end }}
\ No newline at end of file
diff --git a/5g-control-plane/templates/service-amf.yaml b/5g-control-plane/templates/service-amf.yaml
new file mode 100644
index 0000000..d02f57f
--- /dev/null
+++ b/5g-control-plane/templates/service-amf.yaml
@@ -0,0 +1,48 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.amf.deploy }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: amf
+  labels:
+{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+spec:
+  type: {{ .Values.config.amf.serviceType }}
+{{- if .Values.config.amf.ngapp.externalIp }}
+  externalIPs:
+    - {{ .Values.config.amf.ngapp.externalIp }}
+{{- end }}
+  selector:
+{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+  ports:
+  - name: prometheus-exporter
+    port: {{ .Values.config.amf.prometheus.port }}
+    protocol: TCP
+{{- if eq .Values.config.amf.serviceType "NodePort" }}
+{{- if .Values.config.amf.prometheus.nodePort }}
+    nodePort: {{ .Values.config.amf.prometheus.nodePort }}
+{{- end }}
+{{- end }}
+  - name: sbi
+    port: {{ .Values.config.amf.sbi.port }}
+    protocol: TCP
+{{- if eq .Values.config.amf.serviceType "NodePort" }}
+{{- if .Values.config.amf.sbi.nodePort }}
+    nodePort: {{ .Values.config.amf.sbi.nodePort }}
+{{- end }}
+{{- end }}
+  - name: ngapp
+    port: {{ .Values.config.amf.ngapp.port }}
+    protocol: SCTP
+{{- if eq .Values.config.amf.serviceType "NodePort" }}
+{{- if .Values.config.amf.ngapp.nodePort }}
+    nodePort: {{ .Values.config.amf.ngapp.nodePort }}
+{{- end }}
+{{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/service-ausf.yaml b/5g-control-plane/templates/service-ausf.yaml
new file mode 100644
index 0000000..a7c815d
--- /dev/null
+++ b/5g-control-plane/templates/service-ausf.yaml
@@ -0,0 +1,28 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.ausf.deploy }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: ausf
+  labels:
+{{ tuple "ausf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+spec:
+  type: {{ .Values.config.ausf.serviceType }}
+  selector:
+{{ tuple "ausf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+  ports:
+  - name: sbi
+    port: {{ .Values.config.ausf.sbi.port }}
+    protocol: TCP
+{{- if eq .Values.config.ausf.serviceType "NodePort" }}
+{{- if .Values.config.ausf.sbi.nodePort }}
+    nodePort: {{ .Values.config.ausf.sbi.nodePort }}
+{{- end }}
+{{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/service-nrf.yaml b/5g-control-plane/templates/service-nrf.yaml
new file mode 100644
index 0000000..07fcfe3
--- /dev/null
+++ b/5g-control-plane/templates/service-nrf.yaml
@@ -0,0 +1,28 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.nrf.deploy }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: nrf
+  labels:
+{{ tuple "nrf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+spec:
+  type: {{ .Values.config.nrf.serviceType }}
+  selector:
+{{ tuple "nrf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+  ports:
+  - name: sbi
+    port: {{ .Values.config.nrf.sbi.port }}
+    protocol: TCP
+{{- if eq .Values.config.nrf.serviceType "NodePort" }}
+{{- if .Values.config.nrf.sbi.nodePort }}
+    nodePort: {{ .Values.config.nrf.sbi.nodePort }}
+{{- end }}
+{{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/service-nssf.yaml b/5g-control-plane/templates/service-nssf.yaml
new file mode 100644
index 0000000..4bcfcde
--- /dev/null
+++ b/5g-control-plane/templates/service-nssf.yaml
@@ -0,0 +1,28 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.nssf.deploy }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: nssf
+  labels:
+{{ tuple "nssf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+spec:
+  type: {{ .Values.config.nssf.serviceType }}
+  selector:
+{{ tuple "nssf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+  ports:
+  - name: sbi
+    port: {{ .Values.config.nssf.sbi.port }}
+    protocol: TCP
+{{- if eq .Values.config.nssf.serviceType "NodePort" }}
+{{- if .Values.config.nssf.sbi.nodePort }}
+    nodePort: {{ .Values.config.nssf.sbi.nodePort }}
+{{- end }}
+{{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/service-pcf.yaml b/5g-control-plane/templates/service-pcf.yaml
new file mode 100644
index 0000000..1f9f7c4
--- /dev/null
+++ b/5g-control-plane/templates/service-pcf.yaml
@@ -0,0 +1,28 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.pcf.deploy }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: pcf
+  labels:
+{{ tuple "pcf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+spec:
+  type: {{ .Values.config.pcf.serviceType }}
+  selector:
+{{ tuple "pcf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+  ports:
+  - name: sbi
+    port: {{ .Values.config.pcf.sbi.port }}
+    protocol: TCP
+{{- if eq .Values.config.pcf.serviceType "NodePort" }}
+{{- if .Values.config.pcf.sbi.nodePort }}
+    nodePort: {{ .Values.config.pcf.sbi.nodePort }}
+{{- end }}
+{{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/service-smf.yaml b/5g-control-plane/templates/service-smf.yaml
new file mode 100644
index 0000000..6141455
--- /dev/null
+++ b/5g-control-plane/templates/service-smf.yaml
@@ -0,0 +1,44 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.smf.deploy }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: smf
+  labels:
+{{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+spec:
+  type: {{ .Values.config.smf.serviceType }}
+  selector:
+{{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+  ports:
+  - name: pfcp
+    port: {{ .Values.config.smf.n4.port }}
+    protocol: UDP
+{{- if eq .Values.config.smf.serviceType "NodePort" }}
+{{- if .Values.config.smf.n4.nodePort }}
+    nodePort: {{ .Values.config.smf.n4.nodePort }}
+{{- end }}
+{{- end }}
+  - name: prometheus-exporter
+    port: {{ .Values.config.smf.prometheus.port }}
+    protocol: TCP
+{{- if eq .Values.config.smf.serviceType "NodePort" }}
+{{- if .Values.config.smf.prometheus.nodePort }}
+    nodePort: {{ .Values.config.smf.prometheus.nodePort }}
+{{- end }}
+{{- end }}
+  - name: sbi
+    port: {{ .Values.config.smf.sbi.port }}
+    protocol: TCP
+{{- if eq .Values.config.smf.serviceType "NodePort" }}
+{{- if .Values.config.smf.sbi.nodePort }}
+    nodePort: {{ .Values.config.smf.sbi.nodePort }}
+{{- end }}
+{{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/service-udm.yaml b/5g-control-plane/templates/service-udm.yaml
new file mode 100644
index 0000000..fe6fdd9
--- /dev/null
+++ b/5g-control-plane/templates/service-udm.yaml
@@ -0,0 +1,28 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.udm.deploy }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: udm
+  labels:
+{{ tuple "udm" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+spec:
+  type: {{ .Values.config.udm.serviceType }}
+  selector:
+{{ tuple "udm" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+  ports:
+  - name: sbi
+    port: {{ .Values.config.udm.sbi.port }}
+    protocol: TCP
+{{- if eq .Values.config.udm.serviceType "NodePort" }}
+{{- if .Values.config.udm.sbi.nodePort }}
+    nodePort: {{ .Values.config.udm.sbi.nodePort }}
+{{- end }}
+{{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/service-udr.yaml b/5g-control-plane/templates/service-udr.yaml
new file mode 100644
index 0000000..3c13170
--- /dev/null
+++ b/5g-control-plane/templates/service-udr.yaml
@@ -0,0 +1,28 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.udr.deploy }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: udr
+  labels:
+{{ tuple "udr" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+spec:
+  type: {{ .Values.config.udr.serviceType }}
+  selector:
+{{ tuple "udr" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+  ports:
+  - name: sbi
+    port: {{ .Values.config.udr.sbi.port }}
+    protocol: TCP
+{{- if eq .Values.config.udr.serviceType "NodePort" }}
+{{- if .Values.config.udr.sbi.nodePort }}
+    nodePort: {{ .Values.config.udr.sbi.nodePort }}
+{{- end }}
+{{- end }}
+{{- end }}
diff --git a/5g-control-plane/templates/service-webui.yaml b/5g-control-plane/templates/service-webui.yaml
new file mode 100644
index 0000000..b91e094
--- /dev/null
+++ b/5g-control-plane/templates/service-webui.yaml
@@ -0,0 +1,36 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.config.webui.deploy }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: webui
+  labels:
+{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+spec:
+  type: {{ .Values.config.webui.serviceType }}
+  selector:
+{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }}
+  ports:
+  - name: urlport-http
+    port: {{ .Values.config.webui.urlport.port }}
+    protocol: TCP
+{{- if eq .Values.config.webui.serviceType "NodePort" }}
+{{- if .Values.config.webui.urlport.nodePort }}
+    nodePort: {{ .Values.config.webui.urlport.nodePort }}
+{{- end }}
+{{- end }}
+  - name: grpc
+    port: {{ .Values.config.webui.grpc.port }}
+    protocol: TCP
+{{- if eq .Values.config.webui.serviceType "NodePort" }}
+{{- if .Values.config.webui.grpc.nodePort }}
+    nodePort: {{ .Values.config.webui.grpc.nodePort }}
+{{- end }}
+{{- end }}
+{{- end }}