COMAC-170 Use common patterns in values and manifests in mcord-services

This patchset is a part of mcord-services refactoring.
1. Group values by images, nodeSelectors, resources, configs and networks.
2. Make StatefulSets have common patterns for label, resources, and nodeSelectors
3. Use fixed resource name to reduce complexities
4. Don't set namespace as a value, use the one passed with helm install
5. Use common cniPlugin and ipam for SGI and S1U networks
6. Use camel case for value names
7. Do not support old mme anymore
8. Use official omecproject repo for default images

Change-Id: I9654993c8885f12cebb1a93517119556a90127d6
diff --git a/mcord-release/mcord-services/Chart.yaml b/mcord-release/mcord-services/Chart.yaml
index fd5a808..f6b9759 100644
--- a/mcord-release/mcord-services/Chart.yaml
+++ b/mcord-release/mcord-services/Chart.yaml
@@ -18,4 +18,4 @@
 appVersion: "1.0"
 description: M-CORD services with OMEC inside
 name: mcord-services
-version: 0.1.8
+version: 0.1.9
diff --git a/mcord-release/mcord-services/templates/NOTES.txt b/mcord-release/mcord-services/templates/NOTES.txt
index b7a49b5..a5a7136 100644
--- a/mcord-release/mcord-services/templates/NOTES.txt
+++ b/mcord-release/mcord-services/templates/NOTES.txt
@@ -17,16 +17,12 @@
 
 This is the instruction to configure your eNodeB to work with ONF M-CORD. You can find architecture illustration in assets/mcord-architecture.png.
 
-1. Check the eNodeB is operating in following information:
-    eNodeB Address: {{ .Values.enb.host }}
-    eNodeB S1 port: {{ .Values.enb.port }}
-
-2. Configure eNodeB with the correct MME information, get MME IP by following commands:
-    export MMEIP=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.status.podIP}" pods mme-0
+1. Configure eNodeB with the correct MME information.
+    export MMEIP=[node IP]
     export MMEPORT="36412"
 
-    MMEPORT is fixed in templates/mme.yaml.
+    You can change MMEPORT by overriding "Values.config.mme.s1ap.sctp_port_external".
 
-3. Make sure UE's SIM card information is configured in hss.yaml.
+2. Make sure UE's SIM card information is configured in hss.yaml.
 
-4. Attach UE to M-CORD.
+3. Attach UE to OMEC.
diff --git a/mcord-release/mcord-services/templates/_helpers.tpl b/mcord-release/mcord-services/templates/_helpers.tpl
index ac27abf..dde3e3d 100644
--- a/mcord-release/mcord-services/templates/_helpers.tpl
+++ b/mcord-release/mcord-services/templates/_helpers.tpl
@@ -15,37 +15,20 @@
 # limitations under the License.
 */ -}}
 
-{{/* vim: set filetype=mustache: */}}
 {{/*
-Expand the name of the chart.
+abstract: |
+  Renders a set of standardised labels
+usage: |
+  {{ tuple "mme" . | include "mcord-services.metadata_labels" }}
+return: |
+  release: mcord-services
+  app: mme
 */}}
-{{- define "mcord-services.name" -}}
-{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
-
-{{/*
-Create a default fully qualified app name.
-We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
-If release name contains chart name it will be used as a full name.
-*/}}
-{{- define "mcord-services.fullname" -}}
-{{- if .Values.fullnameOverride -}}
-{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
-{{- else -}}
-{{- $name := default .Chart.Name .Values.nameOverride -}}
-{{- if contains $name .Release.Name -}}
-{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
-{{- else -}}
-{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
-{{- end -}}
-{{- end -}}
-
-{{/*
-Create chart name and version as used by the chart label.
-*/}}
-{{- define "mcord-services.chart" -}}
-{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- define "mcord-services.metadata_labels" -}}
+{{- $application := index . 0 -}}
+{{- $context := index . 1 -}}
+release: {{ $context.Release.Name }}
+app: {{ $application }}
 {{- end -}}
 
 {{/*
@@ -66,13 +49,11 @@
 {{- $service := index . 0 -}}
 {{- $type := index . 1 -}}
 {{- $context := index . 2 -}}
-{{- $serviceContext := index $context.Values $service -}}
-{{- $serviceName := $serviceContext.name -}}
 {{- if eq $type "identity" -}}
-{{- printf "%s-0.%s.%s.svc.%s" $serviceName $serviceName $context.Release.Namespace "cluster.local" -}}
+{{- printf "%s-0.%s.%s.svc.%s" $service $service $context.Release.Namespace "cluster.local" -}}
 {{- else if eq $type "realm" -}}
-{{- printf "%s.%s.svc.%s" $serviceName $context.Release.Namespace "cluster.local" -}}
+{{- printf "%s.%s.svc.%s" $service $context.Release.Namespace "cluster.local" -}}
 {{- else if eq $type "host" -}}
-{{- printf "%s-0" $serviceName -}}
+{{- printf "%s-0" $service -}}
 {{- end -}}
 {{- end -}}
diff --git a/mcord-release/mcord-services/templates/bin/_mme-init.sh.tpl b/mcord-release/mcord-services/templates/bin/_mme-init.sh.tpl
index b96bf90..a15e83c 100644
--- a/mcord-release/mcord-services/templates/bin/_mme-init.sh.tpl
+++ b/mcord-release/mcord-services/templates/bin/_mme-init.sh.tpl
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #
 # Copyright 2019-present Open Networking Foundation
 #
diff --git a/mcord-release/mcord-services/templates/bin/_spgwu-launch.sh.tpl b/mcord-release/mcord-services/templates/bin/_spgwu-run.sh.tpl
similarity index 100%
rename from mcord-release/mcord-services/templates/bin/_spgwu-launch.sh.tpl
rename to mcord-release/mcord-services/templates/bin/_spgwu-run.sh.tpl
diff --git a/mcord-release/mcord-services/templates/bin/_spgwu-setup-af-iface.sh.tpl b/mcord-release/mcord-services/templates/bin/_spgwu-setup-af-iface.sh.tpl
index 3266da8..4988379 100644
--- a/mcord-release/mcord-services/templates/bin/_spgwu-setup-af-iface.sh.tpl
+++ b/mcord-release/mcord-services/templates/bin/_spgwu-setup-af-iface.sh.tpl
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #
 # Copyright 2019-present Open Networking Foundation
 # Copyright 2019 Intel Corporation
@@ -17,8 +17,8 @@
 
 set -ex
 
-UL_IFACE="{{- .Values.spgwu.conf.dp.s1u_af_dev -}}"
-DL_IFACE="{{- .Values.spgwu.conf.dp.sgi_af_dev -}}"
+UL_IFACE="{{- .Values.config.spgwu.dp.s1uAfDev -}}"
+DL_IFACE="{{- .Values.config.spgwu.dp.sgiAfDev -}}"
 
 if ! ip link show $UL_IFACE; then
     s1u_mac=$(ip addr show dev s1u-net | awk '$1=="link/ether"{print $2}')
diff --git a/mcord-release/mcord-services/templates/configmap-mme.yaml b/mcord-release/mcord-services/templates/configmap-mme.yaml
index 37163a0..fd40c05 100644
--- a/mcord-release/mcord-services/templates/configmap-mme.yaml
+++ b/mcord-release/mcord-services/templates/configmap-mme.yaml
@@ -1,34 +1,34 @@
----
-# Copyright 2019-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+{{/*
+Copyright 2019-present Open Networking Foundation
 
-{{- if eq .Values.mme.type "openmme" }}
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
 
-{{- if empty .Values.mme.conf.s6a.host -}}
-{{- $_ := tuple "hss" "identity" . | include "mcord-services.endpoint_lookup" | set .Values.mme.conf.s6a "host" -}}
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/}}
+
+{{- if not (hasKey .Values.config.mme.s6a "host") -}}
+{{- $_ := tuple "hss" "identity" . | include "mcord-services.endpoint_lookup" | set .Values.config.mme.s6a "host" -}}
 {{- end }}
-{{- if empty .Values.mme.conf.s6a.realm -}}
-{{- $_ := tuple "hss" "realm" . | include "mcord-services.endpoint_lookup" | set .Values.mme.conf.s6a "realm" -}}
+{{- if not (hasKey .Values.config.mme.s6a "realm") -}}
+{{- $_ := tuple "hss" "realm" . | include "mcord-services.endpoint_lookup" | set .Values.config.mme.s6a "realm" -}}
 {{- end }}
-
 ---
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: {{ .Values.mme.name }}
+  name: mme
+  labels:
+{{ tuple "mme" . | include "mcord-services.metadata_labels" | indent 4 }}
 data:
-  config.json: {{ toJson .Values.mme.conf | quote }}
+  config.json: {{ toJson .Values.config.mme | quote }}
   s6a_fd.conf: |
     # -------- Test configuration ---------
     AppServThreads = 40;
@@ -112,4 +112,3 @@
 {{ tuple "bin/_mme-init.sh.tpl" . | include "mcord-services.template" | indent 4 }}
   mme-run.sh : |
 {{ tuple "bin/_mme-run.sh.tpl" . | include "mcord-services.template" | indent 4 }}
-{{- end }}
diff --git a/mcord-release/mcord-services/templates/configmap-spgwu.yaml b/mcord-release/mcord-services/templates/configmap-spgwu.yaml
index 895bf6c..b821eb0 100644
--- a/mcord-release/mcord-services/templates/configmap-spgwu.yaml
+++ b/mcord-release/mcord-services/templates/configmap-spgwu.yaml
@@ -1,23 +1,26 @@
----
-# Copyright 2019-present Open Networking Foundation
-# Copyright 2019 Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+{{/*
+Copyright 2019-present Open Networking Foundation
+Copyright 2019 Intel Corporation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/}}
 ---
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: {{ .Values.spgwu.name }}
+  name: spgwu
+  labels:
+{{ tuple "spgwu" . | include "mcord-services.metadata_labels" | indent 4 }}
 data:
   dp_config.cfg: |
     if [ ! -d "/dev/hugepages" ]; then
@@ -45,9 +48,9 @@
     dp_comm_port = 20
     cp_comm_ip = CP_ADDR
     cp_comm_port = 21
-{{- if not .Values.network.sriov.enabled }}
+{{- if not .Values.networks.sriov.enabled }}
   setup-af-iface.sh: |
 {{ tuple "bin/_spgwu-setup-af-iface.sh.tpl" . | include "mcord-services.template" | indent 4 }}
 {{- end }}
-  launch.sh: |
-{{ tuple "bin/_spgwu-launch.sh.tpl" . | include "mcord-services.template" | indent 4 }}
+  run.sh: |
+{{ tuple "bin/_spgwu-run.sh.tpl" . | include "mcord-services.template" | indent 4 }}
diff --git a/mcord-release/mcord-services/templates/hss.yaml b/mcord-release/mcord-services/templates/hss.yaml
index a2478f8..4ed1a1d 100644
--- a/mcord-release/mcord-services/templates/hss.yaml
+++ b/mcord-release/mcord-services/templates/hss.yaml
@@ -1,27 +1,30 @@
----
-# Copyright 2018-present Open Networking Foundation
-# Copyright 2018 Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+{{/*
+Copyright 2018-present Open Networking Foundation
+Copyright 2018 Intel Corporation
 
-# Default values for mcord-vepc-helm.
-# This is a YAML-formatted file.
-# Declare variables to be passed into your templates.
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Default values for mcord-vepc-helm.
+This is a YAML-formatted file.
+Declare variables to be passed into your templates.
+*/}}
 ---
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: {{ .Values.hss.name }}
+  name: hss
+  labels:
+{{ tuple "hss" . | include "mcord-services.metadata_labels" | indent 4 }}
 data:
   acl.conf: |
     ALLOW_OLD_TLS   *.cluster.local
@@ -204,10 +207,12 @@
 apiVersion: v1
 kind: Service
 metadata:
-  name: {{ .Values.hss.name }}
+  name: hss
+  labels:
+{{ tuple "hss" . | include "mcord-services.metadata_labels" | indent 4 }}
 spec:
   selector:
-    app: {{ .Values.hss.name }}
+{{ tuple "hss" . | include "mcord-services.metadata_labels" | indent 4 }}
   clusterIP: None
   ports:
   - name: s6a
@@ -217,24 +222,28 @@
 apiVersion: apps/v1
 kind: StatefulSet
 metadata:
-  name: {{ .Values.hss.name }}
+  name: hss
   labels:
-    app: {{ .Values.hss.name }}
+{{ tuple "hss" . | include "mcord-services.metadata_labels" | indent 4 }}
 spec:
   replicas: 1
   selector:
     matchLabels:
-      app: {{ .Values.hss.name }}
-  serviceName: {{ .Values.hss.name }}
+{{ tuple "hss" . | include "mcord-services.metadata_labels" | indent 6 }}
+  serviceName: hss
   template:
     metadata:
       labels:
-        app: {{ .Values.hss.name }}
+{{ tuple "hss" . | include "mcord-services.metadata_labels" | indent 8 }}
     spec:
+    {{- if .Values.nodeSelectors.enabled }}
+      nodeSelector:
+        {{ .Values.nodeSelectors.hss.label }}: {{ .Values.nodeSelectors.hss.value }}
+    {{- end }}
       initContainers:
       - name: init-hss
-        image: {{ .Values.hss.initimage }}
-        imagePullPolicy: Always
+        image: {{ .Values.images.tags.hssdb }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
         command: [ "bash", "-xc"]
         # TODO: Move the SIM card configuration into values.yaml
         args:
@@ -246,27 +255,27 @@
           until data_provisioning_mme.sh 1 19136246000 smsrouter.test3gpp.net test3gpp.net 0 $HSSDB_ADDR; do echo "setting up smsrouter"; sleep 2; done;
         env:
         - name: HSSDB_ADDR
-          value: {{ .Values.hssdb.name }}
+          value: hssdb
         - name: MME_HOST
           value: {{ tuple "mme" "host" . | include "mcord-services.endpoint_lookup" | quote }}
         - name: MME_REALM
           value: {{ tuple "mme" "realm" . | include "mcord-services.endpoint_lookup" | quote }}
       containers:
       - name: hss
-        image: {{ .Values.hss.image }}
-        imagePullPolicy: {{ .Values.global.imagepullpolicy }}
+        image: {{ .Values.images.tags.hss }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
         stdin: true
         tty: true
         env:
         - name: HSSDB_ADDR
-          value: {{ .Values.hssdb.name | quote }}
+          value: hssdb
         - name: MME_IDENTITY
           value: {{ tuple "mme" "identity" . | include "mcord-services.endpoint_lookup" | quote }}
         command: ["bash", "-c", "/opt/c3po/hss/launch.sh; sleep 3600"]
+      {{- if .Values.resources.enabled }}
         resources:
-          limits:
-            cpu: {{ .Values.hss.cpu | quote }}
-            memory: {{ .Values.hss.memory }}
+{{ toYaml .Values.resources.hss | indent 10 }}
+      {{- end }}
         volumeMounts:
         - name: hss-script
           mountPath: /opt/c3po/hss/launch.sh
@@ -276,9 +285,9 @@
       volumes:
       - name: hss-script
         configMap:
-          name: {{ .Values.hss.name }}
+          name: hss
           defaultMode: 493
       - name: hss-config
         configMap:
-          name: {{ .Values.hss.name }}
+          name: hss
           defaultMode: 420
diff --git a/mcord-release/mcord-services/templates/hssdb.yaml b/mcord-release/mcord-services/templates/hssdb.yaml
index 7697838..7bd033b 100644
--- a/mcord-release/mcord-services/templates/hssdb.yaml
+++ b/mcord-release/mcord-services/templates/hssdb.yaml
@@ -1,23 +1,26 @@
----
-# Copyright 2018-present Open Networking Foundation
-# Copyright 2018 Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+{{/*
+Copyright 2018-present Open Networking Foundation
+Copyright 2018 Intel Corporation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/}}
 ---
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: {{ .Values.hssdb.name }}
+  name: hssdb
+  labels:
+{{ tuple "hssdb" . | include "mcord-services.metadata_labels" | indent 4 }}
 data:
   cassandra-rackdc.properties: |
     dc=DC1
@@ -27,55 +30,55 @@
 apiVersion: v1
 kind: Service
 metadata:
+  name: hssdb
   labels:
-    app: {{ .Values.hssdb.name }}
-  name: {{ .Values.hssdb.name }}
+{{ tuple "hssdb" . | include "mcord-services.metadata_labels" | indent 4 }}
 spec:
   clusterIP: None
   ports:
   - name: cql
     port: 9042
   selector:
-    app: {{ .Values.hssdb.name }}
+{{ tuple "hssdb" . | include "mcord-services.metadata_labels" | indent 4 }}
 ---
 apiVersion: "apps/v1"
 kind: StatefulSet
 metadata:
-  name: {{ .Values.hssdb.name }}
+  name: hssdb
   labels:
-     app: {{ .Values.hssdb.name }}
+{{ tuple "hssdb" . | include "mcord-services.metadata_labels" | indent 4 }}
 spec:
-  serviceName: {{ .Values.hssdb.name }}
-  replicas: 1 # 3
+  serviceName: hssdb
+  replicas: 1
   selector:
     matchLabels:
-      app: {{ .Values.hssdb.name }}
+{{ tuple "hssdb" . | include "mcord-services.metadata_labels" | indent 6 }}
   template:
     metadata:
       labels:
-        app: {{ .Values.hssdb.name }}
+{{ tuple "hssdb" . | include "mcord-services.metadata_labels" | indent 8 }}
     spec:
+    {{- if .Values.nodeSelectors.enabled }}
+      nodeSelector:
+        {{ .Values.nodeSelectors.hssdb.label }}: {{ .Values.nodeSelectors.hssdb.value }}
+    {{- end }}
       securityContext:
         runAsUser: 999
         fsGroup: 999
       containers:
       - name: cassandra
-        image: {{ .Values.hssdb.image }}
-        imagePullPolicy: {{ .Values.global.imagepullpolicy }}
+        image: {{ .Values.images.tags.hssdb }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
         ports:
         - containerPort: 9042
           name: cql
-        resources:
-          limits:
-            cpu: {{ .Values.hssdb.cpu | quote }}
-            memory: {{ .Values.hssdb.memory }}
         env:
         - name: MAX_HEAP_SIZE
           value: 512M
         - name: HEAP_NEWSIZE
           value: 100M
         - name: CASSANDRA_SEEDS
-          value: "hssdb-0.{{ .Values.hssdb.name }}.{{ .Values.global.namespace }}.{{ .Values.global.fqdn }}"
+          value: {{ tuple "hssdb" "identity" . | include "mcord-services.endpoint_lookup" | quote }}
         - name: CASSANDRA_CLUSTER_NAME
           value: "HSS Cluster"
         - name: CASSANDRA_RPC_ADDRESS
@@ -89,21 +92,15 @@
             command: ["/bin/bash", "-c", "nodetool status -r | awk -v h=$(hostname) '$2==h {exit ($1==\"UN\" ? 0 : -1)}'"]
           initialDelaySeconds: 15
           timeoutSeconds: 5
+      {{- if .Values.resources.enabled }}
+        resources:
+{{ toYaml .Values.resources.hssdb | indent 10 }}
+      {{- end }}
         volumeMounts:
         - name: hssdb-config
           mountPath: /etc/cassandra/cassandra-rackdc.properties
           subPath: cassandra-rackdc.properties
-        #- name: hssdb-data
-        #  mountPath: /var/lib/cassandra
       volumes:
       - name: hssdb-config
         configMap:
-          name: {{ .Values.hssdb.name }}
-#  volumeClaimTemplates:
-#  - metadata:
-#      name: hssdb-data
-#    spec:
-#      accessModes: [ "ReadWriteOnce" ]
-#      resources:
-#        requests:
-#          storage: 1Gi
+          name: hssdb
diff --git a/mcord-release/mcord-services/templates/mme.yaml b/mcord-release/mcord-services/templates/mme.yaml
deleted file mode 100644
index 06f47be..0000000
--- a/mcord-release/mcord-services/templates/mme.yaml
+++ /dev/null
@@ -1,296 +0,0 @@
----
-# Copyright 2018-present Open Networking Foundation
-# Copyright 2018 Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-{{- if eq .Values.mme.type "c3po" }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ .Values.mme.name }}
-data:
-  launch.sh: |
-    #!/bin/bash
-
-    cd /opt/c3po/mme/bin
-    cp /etc/mme/conf/{vbsm_cfg.txt,vbfd.conf} .
-
-    # from vbsm_cfg.txt
-    SGW_S11_IP=${SGW_S11_IP:-sgw.localdomain}
-    ENB_S1AP_IP=${ENB_S1AP_IP:-enb1.localdomain}
-    ENB_S1AP_PORT=${ENB_S1AP_PORT:-36412}
-    MME_ETH0_IP=${MME_ETH0_IP:-0.0.0.0}
-
-    # from vbfd.conf
-    HSS_CONNECT_PEER=${HSS_CONNECT_PEER:-hss.localdomain}
-    HSS_S6A_IP=${HSS_S6A_IP:-hss.localdomain}
-    HSS_PORT=${HSS_PORT:-3868}
-    VAR_HSS_REALM=${VAR_HSS_REALM:-openair4G.eur}
-
-    sed -i "s/SGW_S11_IP/$(dig $SGW_S11_IP +short)/g" vbsm_cfg.txt
-    sed -i "s/ENB_S1AP_IP/$ENB_S1AP_IP/g" vbsm_cfg.txt
-    sed -i "s/ENB_S1AP_PORT/$ENB_S1AP_PORT/g" vbsm_cfg.txt
-    sed -i "s/MME_ETH0_IP/$MME_ETH0_IP/g" vbsm_cfg.txt
-    sed -i "s/VAR_HSS_HOST/$HSS_CONNECT_PEER/g" vbsm_cfg.txt
-    sed -i "s/VAR_HSS_REALM/$VAR_HSS_REALM/g" vbsm_cfg.txt
-
-    MME_HOST=$(hostname)
-    MME_DOMAIN=$(dnsdomainname)
-    sed -i "s/HSS_CONNECT_PEER/$HSS_CONNECT_PEER/g" vbfd.conf
-    sed -i "s/HSS_S6A_IP/$HSS_S6A_IP/g" vbfd.conf
-    sed -i "s/HSS_PORT/$HSS_PORT/g" vbfd.conf
-    sed -i "s/MME_IDENTITY/$MME_HOST.$MME_DOMAIN/g" vbfd.conf
-    sed -i "s/MME_REALM/$MME_DOMAIN/g" vbfd.conf
-    sed -i "s/MME_HOST/$MME_HOST/g" vbfd.conf
-
-    # generate the certs
-    ./make_certs.sh $MME_HOST $MME_DOMAIN
-
-    # finally, launch
-    ./vb_acc
-  vbfd.conf: |
-    # -------- Test configuration ---------
-
-    # Identity = "<diameter_host>.<diameter_realm>";
-    Identity = "MME_IDENTITY";
-    Realm = "MME_REALM";
-    # Port = 3868;
-    # SecPort = 3869;
-
-    ConnectPeer = "HSS_CONNECT_PEER" { ConnectTo = "HSS_S6A_IP"; No_TLS; port = HSS_PORT; };
-
-    # TLS_Cred = "<diameter_host>.cert.pem", "<diameter_host>.key.pem";
-    TLS_Cred = "MME_HOST.cert.pem",
-        "MME_HOST.key.pem";
-    TLS_CA = "cacert.pem";
-
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_3gpp2_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_draftload_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_etsi283034_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4004_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4006bis_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4072_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4590_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5447_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5580_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5777_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5778_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc6734_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc6942_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7155_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7683_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7944_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29061_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29128_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29154_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29173_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29212_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29214_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29215_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29217_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29229_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29272_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29273_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29329_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29336_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29337_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29338_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29343_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29344_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29345_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29368_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29468_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_ts32299_avps.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_S6as6d.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_S6c.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_S6t.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_SGd.fdx";
-    LoadExtension = "/usr/local/lib/freeDiameter/dict_T6aT6bT7.fdx";
-  vbsm_cfg.txt: |
-    # Configuration file for MME
-
-    #####  NOTE: Please Do NOT change the order of the parameters #####
-
-    # EGTP related
-    VBSM_EG_DFLT_PORT                2123                     # EGTP Default port
-    VBSM_EG_NONDFLT_PORT             2124                     # EGTP Non Default port
-    VBSM_EG_S10_NONDFLT_PORT         2125                     # EGTP Non Default
-    VBSM_EG_S3_NONDFLT_PORT          2126                     # EGTP Non Default port for S3 interface towards SGSN
-                                                              # port for S10
-    VBSM_EG_DFLT_HOST_NAME           "sutlej.ccin.ccpu.com"   # EGTP host name
-
-    # E-NodeB related
-    VBSM_ENB_ADDR_1                  "ENB_S1AP_IP"      # IP address of eNodeB
-    VBSM_ENB_PORT_1                  "ENB_S1AP_PORT"    # eNodeB port
-    #VBSM_ENB_ADDR_2                  "172.26.20.180"    # IP address of eNodeB
-    #VBSM_ENB_PORT_2                  36422              # eNodeB port
-
-    # MME related
-    VBSM_MME_IPADDR                  "MME_ETH0_IP"    # MME IP address
-    VBSM_MME_S1AP_IPADDR             "MME_ETH0_IP"    # MME IP address associated with the S1AP interface
-    VBSM_MME_EGTP_IPADDR             "MME_ETH0_IP"    # MME IP address associated with the EGTP interface
-    VBSM_MME_SCTP_PORT               36412              # MME SCTP port
-
-    VBSM_SGW_IPADDR                  "SGW_S11_IP"   # SGW IP address
-    VBSM_PGW_IPADDR                  "192.168.1.105"    # PDN-GW IP address
-
-    VBSM_UE_NUM                      1000             # Support 1000 UE's
-    VBSM_SCTP_UDP_SERV_TYPE          0              #service type,default 0 SCTP
-
-    # Debug mask to be set; each represent
-    #different debug masks to be set (1 and 0 to unset)
-    #in the form |LVB_DBGMASK_INFO|LVB_DBGMASK_ERROR|LVB_DBGMASK_TRC|LVB_DBGMASK_MEM
-
-    VBSM_MME_DBG_MASK                1111
-    VBSM_DBG_MASK                    1111
-    VBSM_NW_INIATED_DETACH_TIMER     1000
-
-    VBSM_MCC_DIG1         2
-    VBSM_MCC_DIG2         0
-    VBSM_MCC_DIG3         8
-
-    VBSM_MNC_DIG1         0
-    VBSM_MNC_DIG2         1
-    VBSM_MNC_DIG3         -1
-
-    # Target PLMN ID format [ MCC + MNC], + is concatination operator
-    # If MNC has two digits, the last charater shall be 'f'
-    # Valid Configurations: 11223f, 112345.
-    VBSM_TARGET_MME_PLMN_ID          31310f
-    VBSM_TARGET_MME_IP_ADDR          "192.25.1.100"
-
-    VBSM_T3412                        32
-
-    VBSM_SGSN_IP_ADDR                "192.25.1.195"
-
-
-    VBSM_SGSN_PLMN_ID        31311f
-
-    VBSM_FD_CFG  "vbfd.conf"
-    VBSM_HSS_HOST "VAR_HSS_HOST"
-    VBSM_HSS_REALM "VAR_HSS_REALM"
-
-    # set VBSM_DISABLE_EPC_DNS 0 - enable DNS,  1 - disable DNS
-    VBSM_DISABLE_EPC_DNS 1
-    VBSM_DISABLE_EIA0 1
-    VBSM_REL_CAP 1
-    VBSM_MME_NAME "vmmestandalone"
-    VBSM_S1C_SCTP_INSTREAMS 10
-    VBSM_S1C_SCTP_OUTSTREAMS 10
-    VBSM_MAX_ENB  2
-    VBSM_NO_OFGUMMEIS 1
-    VBSM_MMECODE  1
-    VBSM_MMEGRPID 1
-    VBSM_NO_OF_TAI 1
-    VBSM_TAI_LIST    {{"{{1,2,0,8,0,1,1}}"}}
-
-    VBSM_SMS_ROUTER_HOST "smsrouter.test3gpp.net"
-    VBSM_SMS_ROUTER_REALM "test3gpp.net"
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: mme
-spec:
-  selector:
-    app: mme
-  clusterIP: None
-  ports:
-  - name: s11
-    port: 2123
-    protocol: UDP
-  - name: s1ap
-    port: 36412
-    protocol: TCP
-  - name: s6a
-    port: 3868
-    protocol: TCP
----
-apiVersion: apps/v1
-kind: StatefulSet
-metadata:
-  name: {{ .Values.mme.name }}
-  labels:
-    app: {{ .Values.mme.name }}
-spec:
-  replicas: 1
-  selector:
-    matchLabels:
-      app: {{ .Values.mme.name }}
-  serviceName: {{ .Values.mme.name | quote }}
-  template:
-    metadata:
-      labels:
-        app: {{ .Values.mme.name }}
-    spec:
-      # Insert iptable rules as MME implements a userspace SCTP stack
-      initContainers:
-      - name: init-mme
-        image: {{ .Values.mme.initimage }}
-        command: [ "sh", "-c"]
-        securityContext:
-          capabilities:
-            add:
-              - NET_ADMIN
-        args:
-        - iptables -A OUTPUT -p sctp --sport 36412 --chunk-types any ABORT -j DROP;
-          until nslookup hss-0.{{ .Values.hss.name }}.{{ .Values.global.namespace }}.{{ .Values.global.fqdn }};
-          do echo "waiting for hss"; sleep 2; done;
-      containers:
-      - name: mme
-        image: {{ .Values.mme.image | quote }}
-        imagePullPolicy: {{ .Values.global.imagepullpolicy }}
-        env:
-          - name: SGW_S11_IP
-            value: cp-0.cp
-          - name: MME_ETH0_IP
-            valueFrom:
-              fieldRef:
-                fieldPath: status.podIP
-          - name: ENB_S1AP_IP
-            value: {{ .Values.enb.host | quote }}
-          - name: ENB_S1AP_PORT
-            value: {{ .Values.enb.port | quote }}
-          - name: HSS_CONNECT_PEER
-            value: hss-0.{{ .Values.hss.name }}.{{ .Values.global.namespace }}.{{ .Values.global.fqdn }}
-          - name: VAR_HSS_REALM
-            value: {{ .Values.hss.name }}.{{ .Values.global.namespace }}.{{ .Values.global.fqdn }}
-          - name: HSS_S6A_IP
-            value: hss-0.{{ .Values.hss.name }}.{{ .Values.global.namespace }}.{{ .Values.global.fqdn }}
-          - name: HSS_PORT
-            value: "3868"
-        stdin: true
-        tty: true
-        #command: [ "sleep", "3600"]
-        resources:
-          limits:
-            cpu: {{ .Values.mme.cpu | quote }}
-            memory: {{ .Values.mme.memory }}
-        volumeMounts:
-        - name: mme-script
-          mountPath: /opt/c3po/mme/bin/launch.sh
-          subPath: launch.sh
-        - name: mme-config
-          mountPath: /etc/mme/conf
-      volumes:
-      - name: mme-script
-        configMap:
-          name: {{ .Values.mme.name }}
-          defaultMode: 493
-      - name: mme-config
-        configMap:
-          name: {{ .Values.mme.name }}
-          defaultMode: 420
-{{- end }}
diff --git a/mcord-release/mcord-services/templates/networks.yaml b/mcord-release/mcord-services/templates/networks.yaml
index 856345d..075c94e 100644
--- a/mcord-release/mcord-services/templates/networks.yaml
+++ b/mcord-release/mcord-services/templates/networks.yaml
@@ -1,40 +1,41 @@
----
-# Copyright 2018-present Open Networking Foundation
-# Copyright 2018 Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+{{/*
+Copyright 2018-present Open Networking Foundation
+Copyright 2018 Intel Corporation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/}}
 
 ---
 apiVersion: "k8s.cni.cncf.io/v1"
 kind: NetworkAttachmentDefinition
 metadata:
   name: s1u-net
-{{- if $.Values.network.sriov.enabled }}
+{{- if $.Values.networks.sriov.enabled }}
   annotations:
     k8s.v1.cni.cncf.io/resourceName: intel.com/sriov_vfio
 {{- end }}
 spec:
   config: '{
-    "type": {{ .Values.network.s1u.cni_plugin | quote }},
+    "type": {{ .Values.networks.cniPlugin | quote }},
     "ipam": {
-        "type": {{ .Values.network.s1u.ipam | quote }},
-    {{- if eq .Values.network.s1u.ipam "host-local" }}
-        "subnet": {{ .Values.network.s1u.subnet | quote }},
-        "gateway": {{ .Values.network.s1u.gateway | quote }}
-    {{- else if eq .Values.network.s1u.ipam "centralip" }}
+        "type": {{ .Values.networks.ipam | quote }},
+    {{- if eq .Values.networks.ipam "host-local" }}
+        "subnet": {{ .Values.networks.s1u.subnet | quote }},
+        "gateway": {{ .Values.networks.s1u.gateway | quote }}
+    {{- else if eq .Values.networks.ipam "centralip" }}
         "ipType": "cluster",
-        "network": {{ .Values.network.s1u.subnet | quote }},
-        "etcdURL": {{ .Values.global.etcdurl | quote }}
+        "network": {{ .Values.networks.s1u.subnet | quote }},
+        "etcdURL": {{ .Values.networks.etcdurl | quote }}
     {{- end }}
     }
   }'
@@ -43,22 +44,22 @@
 kind: NetworkAttachmentDefinition
 metadata:
   name: sgi-net
-{{- if $.Values.network.sriov.enabled }}
+{{- if $.Values.networks.sriov.enabled }}
   annotations:
     k8s.v1.cni.cncf.io/resourceName: intel.com/sriov_vfio
 {{- end }}
 spec:
   config: '{
-    "type": {{ .Values.network.sgi.cni_plugin | quote }},
+    "type": {{ .Values.networks.cniPlugin | quote }},
     "ipam": {
-        "type": {{ .Values.network.sgi.ipam | quote }},
-    {{- if eq .Values.network.sgi.ipam "host-local" }}
-        "subnet": {{ .Values.network.sgi.subnet | quote }},
-        "gateway": {{ .Values.network.sgi.gateway | quote }}
-    {{- else if eq .Values.network.sgi.ipam "centralip" }}
+        "type": {{ .Values.networks.ipam | quote }},
+    {{- if eq .Values.networks.ipam "host-local" }}
+        "subnet": {{ .Values.networks.sgi.subnet | quote }},
+        "gateway": {{ .Values.networks.sgi.gateway | quote }}
+    {{- else if eq .Values.networks.ipam "centralip" }}
         "ipType": "cluster",
-        "network": {{ .Values.network.sgi.subnet | quote }},
-        "etcdURL": {{ .Values.global.etcdurl | quote }}
+        "network": {{ .Values.networks.sgi.subnet | quote }},
+        "etcdURL": {{ .Values.networks.etcdurl | quote }}
     {{- end }}
     }
   }'
diff --git a/mcord-release/mcord-services/templates/service-mme.yaml b/mcord-release/mcord-services/templates/service-mme.yaml
index fbcd602..db6a8af 100644
--- a/mcord-release/mcord-services/templates/service-mme.yaml
+++ b/mcord-release/mcord-services/templates/service-mme.yaml
@@ -1,35 +1,34 @@
----
-# Copyright 2019-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+{{/*
+Copyright 2019-present Open Networking Foundation
 
-{{- if eq .Values.mme.type "openmme" }}
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/}}
+
 ---
 apiVersion: v1
 kind: Service
 metadata:
-  name: {{ .Values.mme.name }}
+  name: mme
+  labels:
+{{ tuple "mme" . | include "mcord-services.metadata_labels" | indent 4 }}
 spec:
   selector:
-    app: {{ .Values.mme.name }}
+{{ tuple "mme" . | include "mcord-services.metadata_labels" | indent 4 }}
   clusterIP: None
   ports:
   - name: s11
-    port: {{ .Values.mme.conf.s11.egtp_default_port }}
+    port: {{ .Values.config.mme.s11.egtp_default_port }}
     protocol: UDP
-  - name: s1ap
-    port: {{ .Values.mme.conf.s1ap.sctp_port }}
-    protocol: SCTP
   - name: s6a
     port: 3868
     protocol: TCP
@@ -37,14 +36,15 @@
 apiVersion: v1
 kind: Service
 metadata:
-  name: {{ .Values.mme.name }}-external
+  name: mme-sctp
+  labels:
+{{ tuple "mme" . | include "mcord-services.metadata_labels" | indent 4 }}
 spec:
   selector:
-    app: {{ .Values.mme.name }}
+{{ tuple "mme" . | include "mcord-services.metadata_labels" | indent 4 }}
   type: NodePort
   ports:
     - name: s1ap
-      port: {{ .Values.mme.conf.s1ap.sctp_port }}
-      nodePort: {{ .Values.mme.conf.s1ap.sctp_port_external }}
+      port: {{ .Values.config.mme.s1ap.sctp_port }}
+      nodePort: {{ .Values.config.mme.s1ap.sctp_port_external }}
       protocol: SCTP
-{{- end }}
diff --git a/mcord-release/mcord-services/templates/service-spgwu.yaml b/mcord-release/mcord-services/templates/service-spgwu.yaml
index 927c20b..6b07e4c 100644
--- a/mcord-release/mcord-services/templates/service-spgwu.yaml
+++ b/mcord-release/mcord-services/templates/service-spgwu.yaml
@@ -1,26 +1,28 @@
----
-# Copyright 2019-present Open Networking Foundation
-# Copyright 2019 Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+{{/*
+Copyright 2019-present Open Networking Foundation
+Copyright 2019 Intel Corporation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/}}
+
 ---
 apiVersion: v1
 kind: Service
 metadata:
-  name: {{ .Values.spgwu.name }}
+  name: spgwu
 spec:
   selector:
-    app: {{ .Values.spgwu.name }}
+{{ tuple "spgwu" . | include "mcord-services.metadata_labels" | indent 4 }}
   clusterIP: None
   ports:
   - name: cpdp
diff --git a/mcord-release/mcord-services/templates/spgwc.yaml b/mcord-release/mcord-services/templates/spgwc.yaml
index 8082208..3dbd2e5 100644
--- a/mcord-release/mcord-services/templates/spgwc.yaml
+++ b/mcord-release/mcord-services/templates/spgwc.yaml
@@ -1,28 +1,33 @@
----
-# Copyright 2018-present Open Networking Foundation
-# Copyright 2018 Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+{{/*
+Copyright 2018-present Open Networking Foundation
+Copyright 2018 Intel Corporation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/}}
 ---
 apiVersion: v1
 kind: ServiceAccount
 metadata:
-  name: spgwc-pod-reader
+  name: spgwc
+  labels:
+{{ tuple "spgwc" . | include "mcord-services.metadata_labels" | indent 4 }}
 ---
 kind: Role
 apiVersion: rbac.authorization.k8s.io/v1
 metadata:
-  name: pod-reader
+  name: spgwc
+  labels:
+{{ tuple "spgwc" . | include "mcord-services.metadata_labels" | indent 4 }}
 rules:
 - apiGroups: [""]
   resources: ["pods"]
@@ -31,19 +36,23 @@
 kind: RoleBinding
 apiVersion: rbac.authorization.k8s.io/v1
 metadata:
-  name: spgwc-pod-reader-rb
+  name: spgwc
+  labels:
+{{ tuple "spgwc" . | include "mcord-services.metadata_labels" | indent 4 }}
 roleRef:
   apiGroup: rbac.authorization.k8s.io
   kind: Role
-  name: pod-reader
+  name: spgwc
 subjects:
 - kind: ServiceAccount
-  name: spgwc-pod-reader
+  name: spgwc
 ---
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: {{ .Values.spgwc.name }}
+  name: spgwc
+  labels:
+{{ tuple "spgwc" . | include "mcord-services.metadata_labels" | indent 4 }}
 data:
   launch.sh: |
     #!/bin/bash -xe
@@ -432,10 +441,12 @@
 apiVersion: v1
 kind: Service
 metadata:
-  name: {{ .Values.spgwc.name }}
+  name: spgwc
+  labels:
+{{ tuple "spgwc" . | include "mcord-services.metadata_labels" | indent 4 }}
 spec:
   selector:
-    app: {{ .Values.spgwc.name }}
+{{ tuple "spgwc" . | include "mcord-services.metadata_labels" | indent 4 }}
   clusterIP: None
   ports:
   - name: s11
@@ -448,24 +459,28 @@
 apiVersion: apps/v1
 kind: StatefulSet
 metadata:
-  name: {{ .Values.spgwc.name }}
+  name: spgwc
   labels:
-    app: {{ .Values.spgwc.name }}
+{{ tuple "spgwc" . | include "mcord-services.metadata_labels" | indent 4 }}
 spec:
   replicas: 1
   selector:
     matchLabels:
-      app: {{ .Values.spgwc.name }}
-  serviceName: {{ .Values.spgwc.name | quote }}
+{{ tuple "spgwc" . | include "mcord-services.metadata_labels" | indent 6 }}
+  serviceName: spgwc
   template:
     metadata:
       labels:
-        app: {{ .Values.spgwc.name }}
+{{ tuple "spgwc" . | include "mcord-services.metadata_labels" | indent 8 }}
     spec:
-      serviceAccount: spgwc-pod-reader
+    {{- if .Values.nodeSelectors.enabled }}
+      nodeSelector:
+        {{ .Values.nodeSelectors.spgwc.label }}: {{ .Values.nodeSelectors.spgwc.value }}
+    {{- end }}
+      serviceAccountName: spgwc
       initContainers:
       - name: init-spgwc
-        image: {{ .Values.spgwc.initimage }}
+        image: {{ .Values.images.tags.init }}
         command: ["/bin/sh", "-co", "pipefail"]
         args:
         - until $(kubectl get pod -ojson spgwu-0 2>/dev/null | jq -r '.metadata.annotations["k8s.v1.cni.cncf.io/networks-status"]' | jq -r '.[] | select(.name=="s1u-net") | .ips[0]' > /opt/cp/config/shared/SGW_S1U_IP | [ -s /opt/cp/config/shared/SGW_S1U_IP ]);
@@ -475,8 +490,8 @@
           mountPath: /opt/cp/config/shared
       containers:
       - name: spgwc
-        image: {{ .Values.spgwc.image }}
-        imagePullPolicy: {{ .Values.global.imagepullpolicy }}
+        image: {{ .Values.images.tags.spgwc }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
         stdin: true
         tty: true
         command: ["/opt/cp/scripts/launch.sh"]
@@ -487,14 +502,12 @@
               containerName: spgwc
               resource: limits.memory
               divisor: 1Mi
-        #- name: SGW_S1U_IP
-        #  value: "11.1.1.1"
         - name: CP_ADDR
           valueFrom:
             fieldRef:
               fieldPath: status.podIP
         - name: DP_ADDR
-          value: spgwu-0.{{ .Values.spgwu.name }}.{{ .Values.global.namespace }}.{{ .Values.global.fqdn }}
+          value: spgwu-0.spgwu
         - name: MME_S11_IP
           value: {{ tuple "mme" "identity" . | include "mcord-services.endpoint_lookup" | quote }}
         - name: APN
@@ -503,6 +516,10 @@
           value: "16.0.0.0"
         - name: IP_POOL_MASK
           value: "255.0.0.0"
+      {{- if .Values.resources.enabled }}
+        resources:
+{{ toYaml .Values.resources.spgwc | indent 10 }}
+      {{- end }}
         volumeMounts:
         - name: cp-script
           mountPath: /opt/cp/scripts/launch.sh
@@ -511,24 +528,14 @@
           mountPath: /etc/cp/config
         - name: shared-data
           mountPath: /opt/cp/config/shared
-        #- name: hugepage
-        #  mountPath: /dev/hugepages
-        resources:
-          limits:
-            #hugepages-2Mi: 4Gi
-            cpu: {{ .Values.spgwc.cpu | quote }}
-            memory: {{ .Values.spgwc.memory }}
       volumes:
       - name: cp-script
         configMap:
-          name: {{ .Values.spgwc.name }}
+          name: spgwc
           defaultMode: 493
       - name: cp-config
         configMap:
-          name: {{ .Values.spgwc.name }}
+          name: spgwc
           defaultMode: 420
       - name: shared-data
         emptyDir: {}
-        #- name: hugepage
-        #  emptyDir:
-        #    medium: HugePages
diff --git a/mcord-release/mcord-services/templates/statefulset-mme.yaml b/mcord-release/mcord-services/templates/statefulset-mme.yaml
index f2ece70..30c6eaa 100644
--- a/mcord-release/mcord-services/templates/statefulset-mme.yaml
+++ b/mcord-release/mcord-services/templates/statefulset-mme.yaml
@@ -1,35 +1,33 @@
----
-# Copyright 2019-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+{{/*
+Copyright 2019-present Open Networking Foundation
 
-{{- if eq .Values.mme.type "openmme" }}
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
 
-{{- $releaseName := .Release.Name }}
-{{- $namespace := .Values.global.namespace }}
-{{- $name := .Values.mme.name }}
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/}}
+
 ---
 apiVersion: v1
 kind: ServiceAccount
 metadata:
-  name: {{ $releaseName }}-{{ $name }}
-  namespace: {{ $namespace }}
+  name: mme
+  labels:
+{{ tuple "mme" . | include "mcord-services.metadata_labels" | indent 4 }}
 ---
 kind: Role
 apiVersion: rbac.authorization.k8s.io/v1
 metadata:
-  name: {{ $releaseName }}-{{ $name }}
-  namespace: {{ $namespace }}
+  name: mme
+  labels:
+{{ tuple "mme" . | include "mcord-services.metadata_labels" | indent 4 }}
 rules:
   - apiGroups:
       - ""
@@ -49,39 +47,43 @@
 kind: RoleBinding
 apiVersion: rbac.authorization.k8s.io/v1
 metadata:
-  name: {{ $releaseName }}-{{ $name }}
-  namespace: {{ $namespace }}
+  name: mme
+  labels:
+{{ tuple "mme" . | include "mcord-services.metadata_labels" | indent 4 }}
 roleRef:
   apiGroup: rbac.authorization.k8s.io
   kind: Role
-  name: {{ $releaseName }}-{{ $name }}
+  name: mme
 subjects:
 - kind: ServiceAccount
-  name: {{ $releaseName }}-{{ $name }}
+  name: mme
 ---
 apiVersion: apps/v1
 kind: StatefulSet
 metadata:
-  name: {{ $name }}
-  namespace: {{ $namespace }}
+  name: mme
   labels:
-    app: {{ $name }}
+{{ tuple "mme" . | include "mcord-services.metadata_labels" | indent 4 }}
 spec:
   replicas: 1
   selector:
     matchLabels:
-      app: {{ $name }}
-  serviceName: {{ $name | quote }}
+{{ tuple "mme" . | include "mcord-services.metadata_labels" | indent 6 }}
+  serviceName: mme
   template:
     metadata:
       labels:
-        app: {{ $name }}
+{{ tuple "mme" . | include "mcord-services.metadata_labels" | indent 8 }}
     spec:
-      serviceAccountName: {{ $releaseName }}-{{ $name }}
+    {{- if .Values.nodeSelectors.enabled }}
+      nodeSelector:
+        {{ .Values.nodeSelectors.mme.label }}: {{ .Values.nodeSelectors.mme.value }}
+    {{- end }}
+      serviceAccountName: mme
       initContainers:
       - name: mme-dep-check
-        image: {{ .Values.mme.images.tags.dep_check | quote }}
-        imagePullPolicy: {{ .Values.mme.images.pullPolicy }}
+        image: {{ .Values.images.tags.depCheck | quote }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
         securityContext:
           allowPrivilegeEscalation: false
           readOnlyRootFilesystem: false
@@ -102,15 +104,15 @@
           - name: COMMAND
             value: "echo done"
           - name: DEPENDENCY_POD_JSON
-            value: '[{"labels": {"app": {{ .Values.spgwc.name | quote }}}, "requireSameNode": false}, {"labels": {"app": {{ .Values.hss.name | quote }}}, "requireSameNode": false}]'
+            value: '[{"labels": {"app": "spgwc"}, "requireSameNode": false}, {"labels": {"app": "hss"}, "requireSameNode": false}]'
           # add dependency job for make_certs.sh
         command:
           - kubernetes-entrypoint
         volumeMounts:
           []
       - name: mme-init
-        image: {{ .Values.mme.images.tags.mme | quote }}
-        imagePullPolicy: {{ .Values.mme.images.pullPolicy }}
+        image: {{ .Values.images.tags.mme | quote }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
         command: ["/opt/mme/scripts/mme-init.sh"]
         env:
         - name: MME_LOCAL_IP
@@ -127,11 +129,15 @@
           mountPath: /opt/mme/config/shared
       containers:
       - name: mme-app
-        image: {{ .Values.mme.images.tags.mme | quote }}
-        imagePullPolicy: {{ .Values.mme.images.pullPolicy }}
+        image: {{ .Values.images.tags.mme | quote }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
         command: ["bash", "-xc"]
         args:
         - /opt/mme/scripts/mme-run.sh mme-app
+      {{- if .Values.resources.enabled }}
+        resources:
+{{ toYaml .Values.resources.mme | indent 10 }}
+      {{- end }}
         volumeMounts:
         - name: scripts
           mountPath: /opt/mme/scripts/mme-run.sh
@@ -141,11 +147,15 @@
         - name: shared-app
           mountPath: /tmp
       - name: s1ap-app
-        image: {{ .Values.mme.images.tags.mme | quote }}
-        imagePullPolicy: {{ .Values.mme.images.pullPolicy }}
+        image: {{ .Values.images.tags.mme | quote }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
         command: ["bash", "-xc"]
         args:
         - /opt/mme/scripts/mme-run.sh s1ap-app
+      {{- if .Values.resources.enabled }}
+        resources:
+{{ toYaml .Values.resources.mme | indent 10 }}
+      {{- end }}
         volumeMounts:
         - name: scripts
           mountPath: /opt/mme/scripts/mme-run.sh
@@ -155,11 +165,15 @@
         - name: shared-app
           mountPath: /tmp
       - name: s6a-app
-        image: {{ .Values.mme.images.tags.mme | quote }}
-        imagePullPolicy: {{ .Values.mme.images.pullPolicy }}
+        image: {{ .Values.images.tags.mme | quote }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
         command: ["bash", "-xc"]
         args:
         - /opt/mme/scripts/mme-run.sh s6a-app
+      {{- if .Values.resources.enabled }}
+        resources:
+{{ toYaml .Values.resources.mme | indent 10 }}
+      {{- end }}
         volumeMounts:
         - name: scripts
           mountPath: /opt/mme/scripts/mme-run.sh
@@ -169,11 +183,15 @@
         - name: shared-app
           mountPath: /tmp
       - name: s11-app
-        image: {{ .Values.mme.images.tags.mme | quote }}
-        imagePullPolicy: {{ .Values.mme.images.pullPolicy }}
+        image: {{ .Values.images.tags.mme | quote }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
         command: ["bash", "-xc"]
         args:
         - /opt/mme/scripts/mme-run.sh s11-app
+      {{- if .Values.resources.enabled }}
+        resources:
+{{ toYaml .Values.resources.mme | indent 10 }}
+      {{- end }}
         volumeMounts:
         - name: scripts
           mountPath: /opt/mme/scripts/mme-run.sh
@@ -185,14 +203,13 @@
       volumes:
       - name: scripts
         configMap:
-          name: {{ $name }}
+          name: mme
           defaultMode: 493
       - name: configs
         configMap:
-          name: {{ $name }}
+          name: mme
           defaultMode: 420
       - name: shared-data
         emptyDir: {}
       - name: shared-app
         emptyDir: {}
-{{- end }}
diff --git a/mcord-release/mcord-services/templates/statefulset-spgwu.yaml b/mcord-release/mcord-services/templates/statefulset-spgwu.yaml
index 40bf94a..6b4f845 100644
--- a/mcord-release/mcord-services/templates/statefulset-spgwu.yaml
+++ b/mcord-release/mcord-services/templates/statefulset-spgwu.yaml
@@ -1,50 +1,51 @@
----
-# Copyright 2018-present Open Networking Foundation
-# Copyright 2018 Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+{{/*
+Copyright 2018-present Open Networking Foundation
+Copyright 2018 Intel Corporation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/}}
 ---
 apiVersion: apps/v1
 kind: StatefulSet
 metadata:
-  name: {{ .Values.spgwu.name }}
+  name: spgwu
   labels:
-    app: {{ .Values.spgwu.name }}
+{{ tuple "spgwu" . | include "mcord-services.metadata_labels" | indent 4 }}
 spec:
   replicas: 1
   selector:
     matchLabels:
-      app: {{ .Values.spgwu.name }}
-  serviceName: {{ .Values.spgwu.name | quote }}
+{{ tuple "spgwu" . | include "mcord-services.metadata_labels" | indent 6 }}
+  serviceName: spgwu
   template:
     metadata:
       labels:
-        app: {{ .Values.spgwu.name }}
+{{ tuple "spgwu" . | include "mcord-services.metadata_labels" | indent 8 }}
       annotations:
         k8s.v1.cni.cncf.io/networks: '[
-                { "name": "s1u-net", "interface": "s1u-net", "interfaceRequest": "s1u-net" },
-                { "name": "sgi-net", "interface": "sgi-net", "interfaceRequest": "sgi-net" }
+                { "name": "s1u-net", "interface": "s1u-net" },
+                { "name": "sgi-net", "interface": "sgi-net" }
         ]'
     spec:
-{{- if .Values.network.sriov.enabled }}
+    {{- if .Values.nodeSelectors.enabled }}
       nodeSelector:
-{{ toYaml .Values.spgwu.nodeselector | indent 8 }}
-{{- end }}
-{{- if not .Values.network.sriov.enabled }}
+        {{ .Values.nodeSelectors.spgwu.label }}: {{ .Values.nodeSelectors.spgwu.value }}
+    {{- end }}
+    {{- if not .Values.networks.sriov.enabled }}
       initContainers:
         - name: spgwu-iptables-init
-          image: {{ .Values.spgwu.images.tags.init | quote }}
-          imagePullPolicy: {{ .Values.spgwu.images.pullPolicy | quote }}
+          image: {{ .Values.images.tags.init | quote }}
+          imagePullPolicy: {{ .Values.images.pullPolicy | quote }}
           command: [ "sh", "-xec"]
           securityContext:
             capabilities:
@@ -53,8 +54,8 @@
           args:
             - iptables -I OUTPUT -p icmp --icmp-type destination-unreachable -j DROP;
         - name: spgwu-af-iface-init
-          image: {{ .Values.spgwu.images.tags.spgwu | quote }}
-          imagePullPolicy: {{ .Values.spgwu.images.pullPolicy | quote }}
+          image: {{ .Values.images.tags.init | quote }}
+          imagePullPolicy: {{ .Values.images.pullPolicy | quote }}
           securityContext:
             capabilities:
               add:
@@ -65,64 +66,69 @@
             - name: dp-script
               mountPath: /opt/dp/scripts/setup-af-iface.sh
               subPath: setup-af-iface.sh
-{{- end }}
+    {{- end }}
       containers:
-      - name: {{ .Values.spgwu.name }}
-        image: {{ .Values.spgwu.images.tags.spgwu | quote }}
-        imagePullPolicy: {{ .Values.spgwu.images.pullPolicy | quote }}
+      - name: spgwu
+        image: {{ .Values.images.tags.spgwu | quote }}
+        imagePullPolicy: {{ .Values.images.pullPolicy | quote }}
         stdin: true
         tty: true
         env:
         - name: MEM_LIMIT
           valueFrom:
             resourceFieldRef:
-              containerName: {{ .Values.spgwu.name }}
+              containerName: spgwu
               resource: limits.memory
               divisor: 1Mi
         - name: S1U_DEVNAME
-          {{- if .Values.network.sriov.enabled }}
+        {{- if .Values.networks.sriov.enabled }}
           value: s1u-net
-          {{- else }}
-          value: {{ .Values.spgwu.conf.dp.s1u_af_dev | quote }}
-          {{- end }}
+        {{- else }}
+          value: {{ .Values.config.spgwu.dp.s1uAfDev | quote }}
+        {{- end }}
         - name: SGI_DEVNAME
-          {{- if .Values.network.sriov.enabled }}
+        {{- if .Values.networks.sriov.enabled }}
           value: sgi-net
-          {{- else }}
-          value: {{ .Values.spgwu.conf.dp.sgi_af_dev | quote }}
-          {{- end }}
+        {{- else }}
+          value: {{ .Values.config.spgwu.dp.sgiAfDev | quote }}
+        {{- end }}
         - name: DEVICES
-          value: {{ .Values.spgwu.conf.dp.devices | quote }}
+          value: {{ .Values.config.spgwu.dp.devices | quote }}
         - name: CP_ADDR
-          value: spgwc-0.{{ .Values.spgwc.name }}
+          value: spgwc-0.spgwc
         - name: DP_ADDR
           valueFrom:
             fieldRef:
               fieldPath: status.podIP
         - name: RTR_SGI_IP
-          value: {{ .Values.spgwu.conf.dp.rtr_sgi_ip | quote }}
+          value: {{ .Values.config.spgwu.dp.rtrSgiIp | quote }}
         - name: SGI_MASK
-          value: {{ .Values.spgwu.conf.dp.sgi_mask | quote }}
+          value: {{ .Values.config.spgwu.dp.sgiMask | quote }}
         command: ["bash", "-xc"]
         args:
         - ip a;
-          /opt/dp/scripts/launch.sh;
+          /opt/dp/scripts/run.sh;
         volumeMounts:
         - name: dp-script
-          mountPath: /opt/dp/scripts/launch.sh
-          subPath: launch.sh
+          mountPath: /opt/dp/scripts/run.sh
+          subPath: run.sh
         - name: dp-config
           mountPath: /etc/dp/config
-        #- name: hugepage
-        #  mountPath: /dev/hugepages
         resources:
-          limits:
-            #hugepages-1Gi: 8Gi
-            cpu: {{ .Values.spgwu.resources.cpu | quote }}
-            memory: {{ .Values.spgwu.resources.memory }}
-            {{- if .Values.network.sriov.enabled }}
+          requests:
+          {{- if .Values.resources.enabled }}
+{{ toYaml .Values.resources.spgwu.requests | indent 12 }}
+          {{- end }}
+          {{- if .Values.networks.sriov.enabled }}
             intel.com/sriov_vfio: 2
-            {{- end }}
+          {{- end }}
+          limits:
+          {{- if .Values.resources.enabled }}
+{{ toYaml .Values.resources.spgwu.limits | indent 12 }}
+          {{- end }}
+          {{- if .Values.networks.sriov.enabled }}
+            intel.com/sriov_vfio: 2
+          {{- end }}
         securityContext:
           capabilities:
             add:
@@ -130,12 +136,9 @@
       volumes:
       - name: dp-script
         configMap:
-          name: {{ .Values.spgwu.name }}
+          name: spgwu
           defaultMode: 493
       - name: dp-config
         configMap:
-          name: {{ .Values.spgwu.name }}
+          name: spgwu
           defaultMode: 420
-      #- name: hugepage
-      #  emptyDir:
-      #    medium: HugePages
diff --git a/mcord-release/mcord-services/values.yaml b/mcord-release/mcord-services/values.yaml
index 3293d9e..876dcc7 100644
--- a/mcord-release/mcord-services/values.yaml
+++ b/mcord-release/mcord-services/values.yaml
@@ -1,4 +1,3 @@
----
 # Copyright 2018-present Open Networking Foundation
 # Copyright 2018 Intel Corporation
 #
@@ -14,51 +13,79 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# Default values for M-CORD Services
-# This is a YAML-formatted file.
-# Declare variables to be passed into your templates.
+images:
+  tags:
+    init: docker.io/omecproject/pod-init:0.1.0-dev
+    hssdb: docker.io/omecproject/c3po-hssdb:0.1.0-dev
+    hss: docker.io/omecproject/c3po-hss:0.1.0-dev
+    mme: docker.io/omecproject/openmme:0.1.0-dev
+    spgwc: docker.io/omecproject/ngic-cp:0.1.0-dev
+    spgwu: docker.io/omecproject/ngic-dp:0.1.0-dev
+    depCheck: quay.io/stackanetes/kubernetes-entrypoint:v0.3.1
+  pullPolicy: IfNotPresent
 
+nodeSelectors:
+  enabled: false
+  hssdb:
+    label: omec-cp
+    value: enabled
+  hss:
+    label: omec-cp
+    value: enabled
+  mme:
+    label: omec-cp
+    value: enabled
+  spgwc:
+    label: omec-cp
+    value: enabled
+  spgwu:
+    label: omec-dp
+    value: enabled
 
-# Global Block defines shared variables for all Kubernetes objects
-# etcdurl: the etcd connection peer for centralIP network plugin
-global:
-  namespace: default
-  fqdn: svc.cluster.local
-  imagepullpolicy: IfNotPresent
-  etcdurl: http://node1:32379
+resources:
+  enabled: true
+  hssdb:
+    requests:
+      cpu: 2
+      memory: 4Gi
+    limits:
+      cpu: 2
+      memory: 4Gi
+  hss:
+    requests:
+      cpu: 2
+      memory: 1Gi
+    limits:
+      cpu: 2
+      memory: 1Gi
+  mme:
+    # Note that MME pod is composed of 4 containers
+    # Provide resources for a container, not a pod
+    requests:
+      cpu: 0.5
+      memory: 1Gi
+    limits:
+      cpu: 0.5
+      memory: 1Gi
+  spgwc:
+    requests:
+      cpu: 2
+      memory: 5Gi
+    limits:
+      cpu: 2
+      memory: 5Gi
+  spgwu:
+    requests:
+      cpu: 4
+      memory: 8Gi
+    limits:
+      cpu: 4
+      memory: 8Gi
 
-hssdb:
-  name: hssdb
-  image: krsna1729/c3po-hssdb
-  cpu: 3
-  memory: 4Gi
-
-hss:
-  name: hss
-  initimage: krsna1729/c3po-hssdb
-  image: krsna1729/c3po-hss
-  cpu: 3
-  memory: 1Gi
-
-mme:
-  initimage: ngick8stesting/c3po-mmeinit
-  image: ngick8stesting/c3po-mme:5e2eaf6
-  cpu: 3
-  memory: 1Gi
-  # Provide which mme will be used.
-  # Possible options are c3po and openmme but note that c3po mme will be deprecated soon.
-  type: c3po
-  name: mme
-  images:
-    tags:
-      dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.3.1
-      mme: omecproject/openmme:0.1.0-dev
-    pullPolicy: IfNotPresent
-  resources:
-    cpu: 3
-    memory: 1Gi
-  conf:
-    # Leave hostnames and addressses null unless using external spgw and hss.
+config:
+  hssdb: {}
+  hss: {}
+  mme:
     mme:
       name: vmmestandalone
       group_id: 1
@@ -76,69 +103,38 @@
       sctp_port_external: 36412
     s11:
       egtp_default_port: 2123
-      sgw_addr: null
-      pgw_addr: null
+      # sgw_addr and pgw_addr will be set dynamically if unset
+      #sgw_addr:
+      #pgw_addr:
     s6a:
       host_type: freediameter
-      host: null
-      realm: null
-
-spgwc:
-  name: spgwc
-  initimage: ngick8stesting/kubectl
-  image: krsna1729/ngic-cp
-  cpu: 3
-  memory: 5Gi
-
-spgwu:
-  name: spgwu
-  nodeselector:
-    sriov: vfio
-  images:
-    tags:
-      init: ngick8stesting/c3po-init:latest
-      spgwu: krsna1729/ngic-dp:latest
-    pullPolicy: IfNotPresent
-  resources:
-    cpu: 4
-    memory: 8Gi
-  conf:
+      # host and realm will be set dynamically if unset
+      #host:
+      #realm:
+  spgwc: {}
+  spgwu:
     dp:
       # s1u and sgi interfaces are fixed to "s1u-net" and "sgi-net"
-      # Note that s1u_af_dev and sgi_af_dev are valid only when sriov is disabled
+      # Note that s1uAfDev and sgiAfDev are valid only when sriov is disabled
       # setup-af-iface.sh script creates additional veth pair with the names here
-      s1u_af_dev: s1u-veth
-      sgi_af_dev: sgi-veth
-      # set "--no-pci --vdev eth_af_packet0,iface=s1u-dev --vdev eth_af_packet1,iface=sgi-net"
+      s1uAfDev: s1u-veth
+      sgiAfDev: sgi-veth
+      # set "--no-pci --vdev eth_af_packet0,iface=s1u-net --vdev eth_af_packet1,iface=sgi-net"
       # when sriov is disabled
       devices: ""
-      rtr_sgi_ip: 13.1.1.254
-      sgi_mask: 255.255.255.0
+      rtrSgiIp: 13.1.1.254
+      sgiMask: 255.255.255.0
 
-enb:
-  host: 10.1.11.3
-  port: 36412
-
-# Network block defines the networks
-# Note that currently we use fixed list of networks, s1u-net and sgi-net
-#
-# cni_plugin: provide what type of cni will be used
-# ipam: provide what type of ipam will be used
-#       possible options are centralip and host-local
-#       note that centralip requires etcd cluster
-# subnet: provide subnet range to be assigned to the pod
-# gateway: provide default gateway of the network
-#       valid only when centralip is used
-network:
+networks:
   sriov:
     enabled: true
+  cniPlugin: vfioveth
+  ipam: centralip
+  # etcdurl is required only when centralip IPAM is used
+  etcdurl: http://localhost:32379
   s1u:
-    cni_plugin: vfioveth
-    ipam: centralip
     subnet: 119.0.0.0/24
     gateway: 119.0.0.254
   sgi:
-    cni_plugin: vfioveth
-    ipam: centralip
     subnet: 13.1.1.0/24
     gateway: 13.1.1.254