AETHER-3384 Allow external IP and various types for OMEC services

Change-Id: I95bb175d452d2c9e8e3610fb757cbfd9939731c9
diff --git a/omec-control-plane/Chart.yaml b/omec-control-plane/Chart.yaml
index 53ca39d..359daf0 100644
--- a/omec-control-plane/Chart.yaml
+++ b/omec-control-plane/Chart.yaml
@@ -9,4 +9,4 @@
 name: omec-control-plane
 icon: https://guide.opencord.org/logos/cord.svg
 
-version: 0.10.12
+version: 0.10.13
diff --git a/omec-control-plane/templates/service-config4g.yaml b/omec-control-plane/templates/service-config4g.yaml
index 8d426b4..0bda665 100644
--- a/omec-control-plane/templates/service-config4g.yaml
+++ b/omec-control-plane/templates/service-config4g.yaml
@@ -13,40 +13,33 @@
   labels:
 {{ tuple "config4g" . | include "omec-control-plane.metadata_labels" | indent 4 }}
 spec:
-  type: ClusterIP
-  selector:
-{{ tuple "config4g" . | include "omec-control-plane.metadata_labels" | indent 4 }}
-  ports:
-  - name: prometheus-exporter
-    port: {{ .Values.config.config4g.prometheus.port }}
-    protocol: TCP
-  - name: urlport-http
-    port: {{ .Values.config.config4g.urlport.port }}
-    protocol: TCP
-{{- if or .Values.config.config4g.urlport.nodePort.enabled .Values.config.config4g.prometheus.nodePort.enabled }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: config4g-external
-  labels:
-{{ tuple "config4g" . | include "omec-control-plane.metadata_labels" | indent 4 }}
-spec:
-  type: NodePort
-  selector:
-{{ tuple "config4g" . | include "omec-control-plane.metadata_labels" | indent 4 }}
-  ports:
-{{- if .Values.config.config4g.prometheus.nodePort.enabled }}
-  - name: prometheus-exporter
-    port: {{ .Values.config.config4g.prometheus.port }}
-    protocol: TCP
-    nodePort: {{ .Values.config.config4g.prometheus.nodePort.port }}
+  type: {{ .Values.config.config4g.serviceType }}
+{{- if .Values.config.config4g.externalIP }}
+  externalIPs:
+    - {{ .Values.config.config4g.externalIP }}
 {{- end }}
-{{- if .Values.config.config4g.urlport.nodePort.enabled }}
+{{- if eq .Values.config.config4g.serviceType "LoadBalancer" }}
+{{- if .Values.config.config4g.loadBalancerIP }}
+  loadBalancerIP: {{ .Values.config.config4g.loadBalancerIP }}
+{{- end }}
+{{- end }}
+  selector:
+{{ tuple "config4g" . | include "omec-control-plane.metadata_labels" | indent 4 }}
+  ports:
+  - name: prometheus-exporter
+    port: {{ .Values.config.config4g.prometheus.port }}
+    protocol: TCP
+{{- if eq .Values.config.config4g.serviceType "NodePort" }}
+{{- if .Values.config.config4g.prometheus.nodePort }}
+    nodePort: {{ .Values.config.config4g.prometheus.nodePort }}
+{{- end }}
+{{- end }}
   - name: urlport-http
     port: {{ .Values.config.config4g.urlport.port }}
     protocol: TCP
-    nodePort: {{ .Values.config.config4g.urlport.nodePort.port }}
+{{- if eq .Values.config.config4g.serviceType "NodePort" }}
+{{- if .Values.config.config4g.urlport.nodePort }}
+    nodePort: {{ .Values.config.config4g.urlport.nodePort }}
 {{- end }}
 {{- end }}
 {{- end }}
diff --git a/omec-control-plane/templates/service-hss.yaml b/omec-control-plane/templates/service-hss.yaml
index 7ed0145..606a7e2 100644
--- a/omec-control-plane/templates/service-hss.yaml
+++ b/omec-control-plane/templates/service-hss.yaml
@@ -13,64 +13,41 @@
   labels:
 {{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 4 }}
 spec:
+  type: {{ .Values.config.hss.serviceType }}
+{{- if .Values.config.hss.externalIP }}
+  externalIPs:
+    - {{ .Values.config.hss.externalIP }}
+{{- end }}
+{{- if eq .Values.config.hss.serviceType "LoadBalancer" }}
+{{- if .Values.config.hss.loadBalancerIP }}
+  loadBalancerIP: {{ .Values.config.hss.loadBalancerIP }}
+{{- end }}
+{{- end }}
   selector:
 {{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 4 }}
   ports:
   - name: s6a
     port: 3868
     protocol: TCP
+{{- if eq .Values.config.hss.serviceType "NodePort" }}
+{{- if .Values.config.hss.s6a.nodePort }}
+    nodePort: {{ .Values.config.hss.s6a.nodePort }}
+{{- end }}
+{{- end }}
   - name: config-port
     port: {{ .Values.config.hss.configPort.port }}
     protocol: TCP
+{{- if eq .Values.config.hss.serviceType "NodePort" }}
+{{- if .Values.config.hss.configPort.nodePort }}
+    nodePort: {{ .Values.config.hss.configPort.nodePort }}
+{{- end }}
+{{- end }}
   - name: prometheus-exporter
     port: {{ .Values.config.hss.prometheus.port }}
     protocol: TCP
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: hss-headless
-  labels:
-{{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 4 }}
-spec:
-  selector:
-{{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 4 }}
-  clusterIP: None
-  ports:
-  - name: s6a
-    port: 3868
-    protocol: TCP
-  - name: config-port
-    port: {{ .Values.config.hss.configPort.port }}
-    protocol: TCP
-{{- if or .Values.config.hss.s6a.nodePort.enabled .Values.config.hss.configPort.nodePort.enabled}}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: hss-external
-  labels:
-{{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 4 }}
-spec:
-  selector:
-{{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 4 }}
-  type: NodePort
-  ports:
-  {{- if .Values.config.hss.prometheus.nodePort.enabled }}
-    - name: prometheus-exporter
-      port: {{ .Values.config.hss.prometheus.port }}
-      protocol: TCP
-      nodePort: {{ .Values.config.hss.prometheus.nodePort.port }}
-  {{- end }}
-    - name: s6a
-      port: 3868
-      protocol: TCP
-      nodePort: {{ .Values.config.hss.s6a.nodePort.port }}
-  {{- if .Values.config.hss.configPort.nodePort.enabled }}
-    - name: config-port
-      port: {{ .Values.config.hss.configPort.port }}
-      protocol: TCP
-      nodePort: {{ .Values.config.hss.configPort.nodePort.port }}
-  {{- end }}
+{{- if eq .Values.config.hss.serviceType "NodePort" }}
+{{- if .Values.config.hss.prometheus.nodePort }}
+    nodePort: {{ .Values.config.hss.prometheus.nodePort }}
+{{- end }}
 {{- end }}
 {{- end }}
diff --git a/omec-control-plane/templates/service-mme.yaml b/omec-control-plane/templates/service-mme.yaml
index b729ab2..512ea49 100644
--- a/omec-control-plane/templates/service-mme.yaml
+++ b/omec-control-plane/templates/service-mme.yaml
@@ -16,81 +16,55 @@
   labels:
 {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
 spec:
+  type: {{ .Values.config.mme.serviceType }}
+{{- if .Values.config.mme.externalIP }}
+  externalIPs:
+    - {{ .Values.config.mme.externalIP }}
+{{- end }}
+{{- if eq .Values.config.mme.serviceType "LoadBalancer" }}
+{{- if .Values.config.mme.loadBalancerIP }}
+  loadBalancerIP: {{ .Values.config.mme.loadBalancerIP }}
+{{- end }}
+{{- end }}
   selector:
 {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
-  type: ClusterIP
   ports:
     - name: s11
       port: {{ index $configJsonS11 "egtp_default_port" }}
       protocol: UDP
+{{- if eq .Values.config.mme.serviceType "NodePort" }}
+{{- if .Values.config.mme.s11.nodePort }}
+      nodePort: {{ .Values.config.mme.s11.nodePort }}
+{{- end }}
+{{- end }}
     - name: s6a
       port: 3868
       protocol: TCP
-    - name: s1ap
-      port: {{ index $configJsonS1ap "sctp_port" }}
-      protocol: SCTP
+{{- if eq .Values.config.mme.serviceType "NodePort" }}
+{{- if .Values.config.mme.s6a.nodePort }}
+      nodePort: {{ .Values.config.mme.s6a.nodePort }}
+{{- end }}
+{{- end }}
     - name: prometheus-exporter
       port: {{ .Values.config.mme.prometheus.port }}
       protocol: TCP
+{{- if eq .Values.config.mme.serviceType "NodePort" }}
+{{- if .Values.config.mme.prometheus.nodePort }}
+      nodePort: {{ .Values.config.mme.prometheus.nodePort }}
+{{- end }}
+{{- end }}
+    - name: s1ap
+      port: {{ index $configJsonS1ap "sctp_port" }}
+      protocol: SCTP
+{{- if eq .Values.config.mme.serviceType "NodePort" }}
+{{- if .Values.config.mme.s1ap.nodePort }}
+      nodePort: {{ .Values.config.mme.s1ap.nodePort }}
+{{- end }}
+{{- end }}
     - name: mme-app-config
       port: 8080
       protocol: TCP
     - name: mme-s1ap-config
       port: 8081
       protocol: TCP
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: mme-headless
-  labels:
-{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
-spec:
-  selector:
-{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
-  clusterIP: None
-  ports:
-    - name: s11
-      port: {{ index $configJsonS11 "egtp_default_port" }}
-      protocol: UDP
-    - name: s6a
-      port: 3868
-      protocol: TCP
-    - name: s1ap
-      port: {{ index $configJsonS1ap "sctp_port" }}
-      protocol: SCTP
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: mme-external
-  labels:
-{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
-spec:
-  selector:
-{{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }}
-  type: NodePort
-  ports:
-  {{- if .Values.config.mme.prometheus.nodePort.enabled }}
-    - name: prometheus-exporter
-      port: {{ .Values.config.mme.prometheus.port }}
-      protocol: TCP
-      nodePort: {{ .Values.config.mme.prometheus.nodePort.port }}
-  {{- end }}
-  {{- if .Values.config.mme.s11.nodePort.enabled }}
-    - name: s11
-      port: {{ index $configJsonS11 "egtp_default_port" }}
-      protocol: UDP
-      nodePort: {{ .Values.config.mme.s11.nodePort.port }}
-  {{- end }}
-  {{- if .Values.config.mme.s6a.nodePort.enabled }}
-    - name: s6a
-      port: 3868
-      protocol: TCP
-      nodePort: {{ .Values.config.mme.s6a.nodePort.port }}
-  {{- end }}
-    - name: s1ap
-      port: {{ index $configJsonS1ap "sctp_port" }}
-      nodePort: {{ index $configJsonS1ap "sctp_port_external" }}
-      protocol: SCTP
 {{- end }}
diff --git a/omec-control-plane/templates/service-pcrf.yaml b/omec-control-plane/templates/service-pcrf.yaml
index 5058b19..79e0a28 100644
--- a/omec-control-plane/templates/service-pcrf.yaml
+++ b/omec-control-plane/templates/service-pcrf.yaml
@@ -13,69 +13,41 @@
   labels:
 {{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
 spec:
+  type: {{ .Values.config.pcrf.serviceType }}
+{{- if .Values.config.pcrf.externalIP }}
+  externalIPs:
+    - {{ .Values.config.pcrf.externalIP }}
+{{- end }}
+{{- if eq .Values.config.pcrf.serviceType "LoadBalancer" }}
+{{- if .Values.config.pcrf.loadBalancerIP }}
+  loadBalancerIP: {{ .Values.config.pcrf.loadBalancerIP }}
+{{- end }}
+{{- end }}
   selector:
 {{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
   ports:
   - name: gx
     port: 3868
     protocol: TCP
+{{- if eq .Values.config.pcrf.serviceType "NodePort" }}
+{{- if .Values.config.pcrf.gx.nodePort }}
+    nodePort: {{ .Values.config.pcrf.gx.nodePort }}
+{{- end }}
+{{- end }}
   - name: prometheus-exporter
     port: {{ .Values.config.pcrf.prometheus.port }}
     protocol: TCP
+{{- if eq .Values.config.pcrf.serviceType "NodePort" }}
+{{- if .Values.config.pcrf.prometheus.nodePort }}
+    nodePort: {{ .Values.config.pcrf.prometheus.nodePort }}
+{{- end }}
+{{- end }}
   - name: config-port
     port: {{ .Values.config.pcrf.configPort.port }}
     protocol: TCP
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: pcrf-headless
-  labels:
-{{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
-spec:
-  selector:
-{{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
-  clusterIP: None
-  ports:
-  - name: gx
-    port: 3868
-    protocol: TCP
-  - name: prometheus-exporter
-    port: {{ .Values.config.pcrf.prometheus.port }}
-    protocol: TCP
-  - name: config-port
-    port: {{ .Values.config.pcrf.configPort.port }}
-    protocol: TCP
-{{- if or (.Values.config.pcrf.prometheus.nodePort.enabled) (.Values.config.pcrf.gx.nodePort.enabled) }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: pcrf-external
-  labels:
-{{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
-spec:
-  selector:
-{{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
-  type: NodePort
-  ports:
-  {{- if .Values.config.pcrf.prometheus.nodePort.enabled }}
-    - name: prometheus-exporter
-      port: {{ .Values.config.pcrf.prometheus.port }}
-      protocol: TCP
-      nodePort: {{ .Values.config.pcrf.prometheus.nodePort.port }}
-  {{- end }}
-  {{- if .Values.config.pcrf.gx.nodePort.enabled }}
-  - name: gx
-    port: 3868
-    protocol: TCP
-    nodePort: {{ .Values.config.pcrf.gx.nodePort.port }}
-  {{- end }}
-  {{- if .Values.config.pcrf.configPort.nodePort.enabled }}
-    - name: config-port
-      port: {{ .Values.config.pcrf.configPort.port }}
-      protocol: TCP
-      nodePort: {{ .Values.config.pcrf.configPort.nodePort.port }}
-  {{- end }}
+{{- if eq .Values.config.pcrf.serviceType "NodePort" }}
+{{- if .Values.config.pcrf.configPort.nodePort }}
+    nodePort: {{ .Values.config.pcrf.configPort.nodePort }}
+{{- end }}
 {{- end }}
 {{- end }}
diff --git a/omec-control-plane/templates/service-spgwc.yaml b/omec-control-plane/templates/service-spgwc.yaml
index 082a7bc..5320eba 100644
--- a/omec-control-plane/templates/service-spgwc.yaml
+++ b/omec-control-plane/templates/service-spgwc.yaml
@@ -13,69 +13,49 @@
   labels:
 {{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
 spec:
-  type: ClusterIP
+  type: {{ .Values.config.spgwc.serviceType }}
+{{- if .Values.config.spgwc.externalIP }}
+  externalIPs:
+    - {{ .Values.config.spgwc.externalIP }}
+{{- end }}
+{{- if eq .Values.config.spgwc.serviceType "LoadBalancer" }}
+{{- if .Values.config.spgwc.loadBalancerIP }}
+  loadBalancerIP: {{ .Values.config.spgwc.loadBalancerIP }}
+{{- end }}
+{{- end }}
   selector:
 {{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
   ports:
   - name: s11
     port: {{ .Values.config.spgwc.s11.port }}
     protocol: UDP
+{{- if eq .Values.config.spgwc.serviceType "NodePort" }}
+{{- if .Values.config.spgwc.s11.nodePort }}
+    nodePort: {{ .Values.config.spgwc.s11.nodePort }}
+{{- end }}
+{{- end }}
   - name: pfcp
     port: {{ .Values.config.spgwc.n4.port }}
     protocol: UDP
+{{- if eq .Values.config.spgwc.serviceType "NodePort" }}
+{{- if .Values.config.spgwc.n4.nodePort }}
+    nodePort: {{ .Values.config.spgwc.n4.nodePort }}
+{{- end }}
+{{- end }}
   - name: prometheus-exporter
     port: {{ .Values.config.spgwc.prometheus.port }}
     protocol: TCP
+{{- if eq .Values.config.spgwc.serviceType "NodePort" }}
+{{- if .Values.config.spgwc.prometheus.nodePort }}
+    nodePort: {{ .Values.config.spgwc.prometheus.nodePort }}
+{{- end }}
+{{- end }}
   - name: rest
     port: {{ .Values.config.spgwc.rest.port }}
     protocol: TCP
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: spgwc-headless
-  labels:
-{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
-spec:
-  clusterIP: None
-  selector:
-{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
-{{- if or .Values.config.spgwc.s11.nodePort.enabled .Values.config.spgwc.n4.nodePort.enabled .Values.config.spgwc.prometheus.nodePort.enabled .Values.config.spgwc.rest.nodePort.enabled }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: spgwc-external
-  labels:
-{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
-spec:
-  type: NodePort
-  selector:
-{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
-  ports:
-{{- if .Values.config.spgwc.s11.nodePort.enabled }}
-  - name: s11
-    port: {{ .Values.config.spgwc.s11.port }}
-    protocol: UDP
-    nodePort: {{ .Values.config.spgwc.s11.nodePort.port }}
-{{- end }}
-{{- if .Values.config.spgwc.n4.nodePort.enabled }}
-  - name: pfcp
-    port: {{ .Values.config.spgwc.n4.port }}
-    protocol: UDP
-    nodePort: {{ .Values.config.spgwc.n4.nodePort.port }}
-{{- end }}
-{{- if .Values.config.spgwc.prometheus.nodePort.enabled }}
-  - name: prometheus-exporter
-    port: {{ .Values.config.spgwc.prometheus.port }}
-    protocol: TCP
-    nodePort: {{ .Values.config.spgwc.prometheus.nodePort.port }}
-{{- end }}
-{{- if .Values.config.spgwc.rest.nodePort.enabled }}
-  - name: rest
-    port: {{ .Values.config.spgwc.rest.port }}
-    protocol: TCP
-    nodePort: {{ .Values.config.spgwc.rest.nodePort.port }}
+{{- if eq .Values.config.spgwc.serviceType "NodePort" }}
+{{- if .Values.config.spgwc.rest.nodePort }}
+    nodePort: {{ .Values.config.spgwc.rest.nodePort }}
 {{- end }}
 {{- end }}
 {{- end }}
diff --git a/omec-control-plane/values.yaml b/omec-control-plane/values.yaml
index 150a30c..db2b0be 100644
--- a/omec-control-plane/values.yaml
+++ b/omec-control-plane/values.yaml
@@ -117,16 +117,16 @@
     deploy: true
     podAnnotations:
       field.cattle.io/workloadMetrics: '[{"path":"/metrics","port":9089,"schema":"HTTP"}]'
+    serviceType: ClusterIP
+    #externalIP:
+    #loadBalancerIP:
+    # nodePort is valid only when serviceType is NodePort
     prometheus:
       port: 9089
-      nodePort:
-        enabled: false
-        port: 30084
+      nodePort: 30084
     urlport:
       port: 5000
-      nodePort:
-        enabled: false
-        port: 35000
+      nodePort: 35000
     cfgFiles:
       webuicfg.conf:
         info:
@@ -153,20 +153,19 @@
       fluentbit.io/parser: pcrf
       field.cattle.io/workloadMetrics: '[{"path":"/metrics","port":9089,"schema":"HTTP"}]'
     pcrfdb: cassandra
+    serviceType: ClusterIP
+    #externalIP:
+    #loadBalancerIP:
+    # nodePort is valid only when serviceType is NodePort
     configPort:
       port: 8080
-      nodePort:
-        enabled: false
-        port: 30081
+      nodePort: 30081
     gx:
-      nodePort:
-        enabled: false
-        port: 33868
+      #port: 3868 # fixed
+      nodePort: 33868
     prometheus:
       port: 9089
-      nodePort:
-        enabled: false
-        port: 30086
+      nodePort: 30086
     # Provide the peer whitelist extension
     # The peer name must be a fqdn. We allow also a special "*" character as the
     # first label of the fqdn, to allow all fqdn with the same domain name.
@@ -284,20 +283,19 @@
       fluentbit.io/parser: hss
       field.cattle.io/workloadMetrics: '[{"path":"/metrics","port":9089,"schema":"HTTP"}]'
     hssdb: cassandra
+    serviceType: ClusterIP
+    #externalIP:
+    #loadBalancerIP:
+    # nodePort is valid only when serviceType is NodePort
     s6a:
-      nodePort:
-        enabled: false
-        port: 33868
+      #port: 3868 # fixed
+      nodePort: 33868
     configPort:
       port: 8080
-      nodePort:
-        enabled: false
-        port: 30081
+      nodePort: 30081
     prometheus:
       port: 9089
-      nodePort:
-        enabled: false
-        port: 30086
+      nodePort: 30086
     # Provide the peer whitelist extension
     # The peer name must be a fqdn. We allow also a special "*" character as the
     # first label of the fqdn, to allow all fqdn with the same domain name.
@@ -402,19 +400,22 @@
       fluentbit.io/parser: mme
       field.cattle.io/workloadMetrics: '[{"path":"/metrics","port":3081,"schema":"HTTP"}]'
     spgwAddr: spgwc
+    serviceType: NodePort
+    #externalIP:
+    #loadBalancerIP:
+    # nodePort is valid only when serviceType is NodePort
     s11:
-      nodePort:
-        enabled: false
-        port: 32124
+      #port: use cfgFiles.config.json.s11.egtp_default_port
+      nodePort: 32124
     s6a:
-      nodePort:
-        enabled: false
-        port: 33869
+      #port: 3868 #fixed
+      nodePort: 33869
     prometheus:
       port: 3081
-      nodePort:
-        enabled: false
-        port: 30085
+      nodePort: 30085
+    s1ap:
+      #port: use cfgFiles.config.json.s6a.sctp_port
+      nodePort: 36412
     # See https://github.com/omec-project/openmme/blob/master/README.txt for more config options
     cfgFiles:
       config.json:
@@ -438,7 +439,6 @@
             sec_alg_list: "[EEA0, EEA1, EEA2]"
         s1ap:
           sctp_port: 36412
-          sctp_port_external: 36412
         s11:
           egtp_default_port: 2123
           # sgw_addr and pgw_addr will be set dynamically if unset
@@ -457,26 +457,22 @@
     podAnnotations:
       fluentbit.io/parser: spgwc
       field.cattle.io/workloadMetrics: '[{"path":"/metrics","port":9089,"schema":"HTTP"}]'
+    serviceType: ClusterIP
+    #externalIP:
+    #loadBalancerIP:
+    # nodePort is valid only when serviceType is NodePort
     s11:
       port: 2123
-      nodePort:
-        enabled: false
-        port: 32123
+      nodePort: 32123
     n4:
       port: 8805
-      nodePort:
-        enabled: false
-        port: 30021
+      nodePort: 30021
     prometheus:
       port: 9089
-      nodePort:
-        enabled: false
-        port: 30084
+      nodePort: 30084
     rest:
       port: 8080
-      nodePort:
-        enabled: false
-        port: 30080
+      nodePort: 30080
     cfgFiles:
       cp.json:
         global: