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