AETHER-2075 [5g-control-plane] Fix monitoring target down alerts

Removed Prometheus service monitor annotation and ports for unimplemented NFs.
Also, refactored Service template.

Change-Id: I105e4ae05baf4f819c881c7e1c6b74064b0a7d6b
diff --git a/omec/5g-control-plane/Chart.yaml b/omec/5g-control-plane/Chart.yaml
index cf3681e..edf7f23 100644
--- a/omec/5g-control-plane/Chart.yaml
+++ b/omec/5g-control-plane/Chart.yaml
@@ -8,7 +8,7 @@
 name: 5g-control-plane
 icon: https://guide.opencord.org/logos/cord.svg
 
-version: 0.2.19
+version: 0.2.20
 
 dependencies:
   - name: mongodb
diff --git a/omec/5g-control-plane/templates/service-amf.yaml b/omec/5g-control-plane/templates/service-amf.yaml
index 6900dba..d02f57f 100644
--- a/omec/5g-control-plane/templates/service-amf.yaml
+++ b/omec/5g-control-plane/templates/service-amf.yaml
@@ -13,29 +13,7 @@
   labels:
 {{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
 spec:
-  type: ClusterIP
-  selector:
-{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
-  ports:
-  - name: prometheus-exporter
-    port: {{ .Values.config.amf.prometheus.port }}
-    protocol: TCP
-  - name: sbi
-    port: {{ .Values.config.amf.sbi.port }}
-    protocol: TCP
-  - name: ngapp
-    port: {{ .Values.config.amf.ngapp.port }}
-    protocol: SCTP
-{{- if or .Values.config.amf.prometheus.nodePort.enabled .Values.config.amf.sbi.nodePort.enabled .Values.config.amf.ngapp.nodePort.enabled }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: amf-external
-  labels:
-{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
-spec:
-  type: NodePort
+  type: {{ .Values.config.amf.serviceType }}
 {{- if .Values.config.amf.ngapp.externalIp }}
   externalIPs:
     - {{ .Values.config.amf.ngapp.externalIp }}
@@ -43,23 +21,28 @@
   selector:
 {{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
   ports:
-{{- if .Values.config.amf.prometheus.nodePort.enabled }}
   - name: prometheus-exporter
     port: {{ .Values.config.amf.prometheus.port }}
     protocol: TCP
-    nodePort: {{ .Values.config.amf.prometheus.nodePort.port }}
+{{- if eq .Values.config.amf.serviceType "NodePort" }}
+{{- if .Values.config.amf.prometheus.nodePort }}
+    nodePort: {{ .Values.config.amf.prometheus.nodePort }}
 {{- end }}
-{{- if .Values.config.amf.sbi.nodePort.enabled }}
+{{- end }}
   - name: sbi
     port: {{ .Values.config.amf.sbi.port }}
     protocol: TCP
-    nodePort: {{ .Values.config.amf.sbi.nodePort.port }}
+{{- if eq .Values.config.amf.serviceType "NodePort" }}
+{{- if .Values.config.amf.sbi.nodePort }}
+    nodePort: {{ .Values.config.amf.sbi.nodePort }}
 {{- end }}
-{{- if .Values.config.amf.ngapp.nodePort.enabled }}
+{{- end }}
   - name: ngapp
     port: {{ .Values.config.amf.ngapp.port }}
     protocol: SCTP
-    nodePort: {{ .Values.config.amf.ngapp.nodePort.port }}
+{{- if eq .Values.config.amf.serviceType "NodePort" }}
+{{- if .Values.config.amf.ngapp.nodePort }}
+    nodePort: {{ .Values.config.amf.ngapp.nodePort }}
 {{- end }}
 {{- end }}
 {{- end }}
diff --git a/omec/5g-control-plane/templates/service-ausf.yaml b/omec/5g-control-plane/templates/service-ausf.yaml
index defa18f..a7c815d 100644
--- a/omec/5g-control-plane/templates/service-ausf.yaml
+++ b/omec/5g-control-plane/templates/service-ausf.yaml
@@ -13,40 +13,16 @@
   labels:
 {{ tuple "ausf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
 spec:
-  type: ClusterIP
+  type: {{ .Values.config.ausf.serviceType }}
   selector:
 {{ tuple "ausf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
   ports:
-  - name: prometheus-exporter
-    port: {{ .Values.config.ausf.prometheus.port }}
-    protocol: TCP
   - name: sbi
     port: {{ .Values.config.ausf.sbi.port }}
     protocol: TCP
-{{- if or .Values.config.ausf.prometheus.nodePort.enabled .Values.config.ausf.sbi.nodePort.enabled }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: ausf-external
-  labels:
-{{ tuple "ausf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
-spec:
-  type: NodePort
-  selector:
-{{ tuple "ausf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
-  ports:
-{{- if .Values.config.ausf.prometheus.nodePort.enabled }}
-  - name: prometheus-exporter
-    port: {{ .Values.config.ausf.prometheus.port }}
-    protocol: TCP
-    nodePort: {{ .Values.config.ausf.prometheus.nodePort.port }}
-{{- end }}
-{{- if .Values.config.ausf.sbi.nodePort.enabled }}
-  - name: sbi
-    port: {{ .Values.config.ausf.sbi.port }}
-    protocol: TCP
-    nodePort: {{ .Values.config.ausf.sbi.nodePort.port }}
+{{- if eq .Values.config.ausf.serviceType "NodePort" }}
+{{- if .Values.config.ausf.sbi.nodePort }}
+    nodePort: {{ .Values.config.ausf.sbi.nodePort }}
 {{- end }}
 {{- end }}
 {{- end }}
diff --git a/omec/5g-control-plane/templates/service-nrf.yaml b/omec/5g-control-plane/templates/service-nrf.yaml
index cbe45d1..07fcfe3 100644
--- a/omec/5g-control-plane/templates/service-nrf.yaml
+++ b/omec/5g-control-plane/templates/service-nrf.yaml
@@ -13,31 +13,16 @@
   labels:
 {{ tuple "nrf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
 spec:
-  type: ClusterIP
+  type: {{ .Values.config.nrf.serviceType }}
   selector:
 {{ tuple "nrf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
   ports:
   - name: sbi
     port: {{ .Values.config.nrf.sbi.port }}
     protocol: TCP
-{{- if or .Values.config.nrf.sbi.nodePort.enabled }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: nrf-external
-  labels:
-{{ tuple "nrf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
-spec:
-  type: NodePort
-  selector:
-{{ tuple "nrf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
-  ports:
-{{- if .Values.config.nrf.sbi.nodePort.enabled }}
-  - name: sbi
-    port: {{ .Values.config.nrf.sbi.port }}
-    protocol: TCP
-    nodePort: {{ .Values.config.nrf.sbi.nodePort.port }}
+{{- if eq .Values.config.nrf.serviceType "NodePort" }}
+{{- if .Values.config.nrf.sbi.nodePort }}
+    nodePort: {{ .Values.config.nrf.sbi.nodePort }}
 {{- end }}
 {{- end }}
 {{- end }}
diff --git a/omec/5g-control-plane/templates/service-nssf.yaml b/omec/5g-control-plane/templates/service-nssf.yaml
index d92d524..4bcfcde 100644
--- a/omec/5g-control-plane/templates/service-nssf.yaml
+++ b/omec/5g-control-plane/templates/service-nssf.yaml
@@ -13,40 +13,16 @@
   labels:
 {{ tuple "nssf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
 spec:
-  type: ClusterIP
+  type: {{ .Values.config.nssf.serviceType }}
   selector:
 {{ tuple "nssf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
   ports:
-  - name: prometheus-exporter
-    port: {{ .Values.config.nssf.prometheus.port }}
-    protocol: TCP
   - name: sbi
     port: {{ .Values.config.nssf.sbi.port }}
     protocol: TCP
-{{- if or .Values.config.nssf.prometheus.nodePort.enabled .Values.config.nssf.sbi.nodePort.enabled }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: nssf-external
-  labels:
-{{ tuple "nssf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
-spec:
-  type: NodePort
-  selector:
-{{ tuple "nssf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
-  ports:
-{{- if .Values.config.nssf.prometheus.nodePort.enabled }}
-  - name: prometheus-exporter
-    port: {{ .Values.config.nssf.prometheus.port }}
-    protocol: TCP
-    nodePort: {{ .Values.config.nssf.prometheus.nodePort.port }}
-{{- end }}
-{{- if .Values.config.nssf.sbi.nodePort.enabled }}
-  - name: sbi
-    port: {{ .Values.config.nssf.sbi.port }}
-    protocol: TCP
-    nodePort: {{ .Values.config.nssf.sbi.nodePort.port }}
+{{- if eq .Values.config.nssf.serviceType "NodePort" }}
+{{- if .Values.config.nssf.sbi.nodePort }}
+    nodePort: {{ .Values.config.nssf.sbi.nodePort }}
 {{- end }}
 {{- end }}
 {{- end }}
diff --git a/omec/5g-control-plane/templates/service-pcf.yaml b/omec/5g-control-plane/templates/service-pcf.yaml
index 69724df..1f9f7c4 100644
--- a/omec/5g-control-plane/templates/service-pcf.yaml
+++ b/omec/5g-control-plane/templates/service-pcf.yaml
@@ -13,40 +13,16 @@
   labels:
 {{ tuple "pcf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
 spec:
-  type: ClusterIP
+  type: {{ .Values.config.pcf.serviceType }}
   selector:
 {{ tuple "pcf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
   ports:
-  - name: prometheus-exporter
-    port: {{ .Values.config.pcf.prometheus.port }}
-    protocol: TCP
   - name: sbi
     port: {{ .Values.config.pcf.sbi.port }}
     protocol: TCP
-{{- if or .Values.config.pcf.prometheus.nodePort.enabled .Values.config.pcf.sbi.nodePort.enabled }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: pcf-external
-  labels:
-{{ tuple "pcf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
-spec:
-  type: NodePort
-  selector:
-{{ tuple "pcf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
-  ports:
-{{- if .Values.config.pcf.prometheus.nodePort.enabled }}
-  - name: prometheus-exporter
-    port: {{ .Values.config.pcf.prometheus.port }}
-    protocol: TCP
-    nodePort: {{ .Values.config.pcf.prometheus.nodePort.port }}
-{{- end }}
-{{- if .Values.config.pcf.sbi.nodePort.enabled }}
-  - name: sbi
-    port: {{ .Values.config.pcf.sbi.port }}
-    protocol: TCP
-    nodePort: {{ .Values.config.pcf.sbi.nodePort.port }}
+{{- if eq .Values.config.pcf.serviceType "NodePort" }}
+{{- if .Values.config.pcf.sbi.nodePort }}
+    nodePort: {{ .Values.config.pcf.sbi.nodePort }}
 {{- end }}
 {{- end }}
 {{- end }}
diff --git a/omec/5g-control-plane/templates/service-smf.yaml b/omec/5g-control-plane/templates/service-smf.yaml
index 8e9d50d..6141455 100644
--- a/omec/5g-control-plane/templates/service-smf.yaml
+++ b/omec/5g-control-plane/templates/service-smf.yaml
@@ -13,49 +13,32 @@
   labels:
 {{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
 spec:
-  type: ClusterIP
+  type: {{ .Values.config.smf.serviceType }}
   selector:
 {{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
   ports:
   - name: pfcp
     port: {{ .Values.config.smf.n4.port }}
     protocol: UDP
+{{- if eq .Values.config.smf.serviceType "NodePort" }}
+{{- if .Values.config.smf.n4.nodePort }}
+    nodePort: {{ .Values.config.smf.n4.nodePort }}
+{{- end }}
+{{- end }}
   - name: prometheus-exporter
     port: {{ .Values.config.smf.prometheus.port }}
     protocol: TCP
+{{- if eq .Values.config.smf.serviceType "NodePort" }}
+{{- if .Values.config.smf.prometheus.nodePort }}
+    nodePort: {{ .Values.config.smf.prometheus.nodePort }}
+{{- end }}
+{{- end }}
   - name: sbi
     port: {{ .Values.config.smf.sbi.port }}
     protocol: TCP
-{{- if or .Values.config.smf.n4.nodePort.enabled .Values.config.smf.prometheus.nodePort.enabled .Values.config.smf.sbi.nodePort.enabled }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: smf-external
-  labels:
-{{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
-spec:
-  type: NodePort
-  selector:
-{{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
-  ports:
-{{- if .Values.config.smf.n4.nodePort.enabled }}
-  - name: pfcp
-    port: {{ .Values.config.smf.n4.port }}
-    protocol: UDP
-    nodePort: {{ .Values.config.smf.n4.nodePort.port }}
-{{- end }}
-{{- if .Values.config.smf.prometheus.nodePort.enabled }}
-  - name: prometheus-exporter
-    port: {{ .Values.config.smf.prometheus.port }}
-    protocol: TCP
-    nodePort: {{ .Values.config.smf.prometheus.nodePort.port }}
-{{- end }}
-{{- if .Values.config.smf.sbi.nodePort.enabled }}
-  - name: sbi
-    port: {{ .Values.config.smf.sbi.port }}
-    protocol: TCP
-    nodePort: {{ .Values.config.smf.sbi.nodePort.port }}
+{{- if eq .Values.config.smf.serviceType "NodePort" }}
+{{- if .Values.config.smf.sbi.nodePort }}
+    nodePort: {{ .Values.config.smf.sbi.nodePort }}
 {{- end }}
 {{- end }}
 {{- end }}
diff --git a/omec/5g-control-plane/templates/service-udm.yaml b/omec/5g-control-plane/templates/service-udm.yaml
index c2269b7..fe6fdd9 100644
--- a/omec/5g-control-plane/templates/service-udm.yaml
+++ b/omec/5g-control-plane/templates/service-udm.yaml
@@ -13,40 +13,16 @@
   labels:
 {{ tuple "udm" . | include "5g-control-plane.metadata_labels" | indent 4 }}
 spec:
-  type: ClusterIP
+  type: {{ .Values.config.udm.serviceType }}
   selector:
 {{ tuple "udm" . | include "5g-control-plane.metadata_labels" | indent 4 }}
   ports:
-  - name: prometheus-exporter
-    port: {{ .Values.config.udm.prometheus.port }}
-    protocol: TCP
   - name: sbi
     port: {{ .Values.config.udm.sbi.port }}
     protocol: TCP
-{{- if or .Values.config.udm.prometheus.nodePort.enabled .Values.config.udm.sbi.nodePort.enabled }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: udm-external
-  labels:
-{{ tuple "udm" . | include "5g-control-plane.metadata_labels" | indent 4 }}
-spec:
-  type: NodePort
-  selector:
-{{ tuple "udm" . | include "5g-control-plane.metadata_labels" | indent 4 }}
-  ports:
-{{- if .Values.config.udm.prometheus.nodePort.enabled }}
-  - name: prometheus-exporter
-    port: {{ .Values.config.udm.prometheus.port }}
-    protocol: TCP
-    nodePort: {{ .Values.config.udm.prometheus.nodePort.port }}
-{{- end }}
-{{- if .Values.config.udm.sbi.nodePort.enabled }}
-  - name: sbi
-    port: {{ .Values.config.udm.sbi.port }}
-    protocol: TCP
-    nodePort: {{ .Values.config.udm.sbi.nodePort.port }}
+{{- if eq .Values.config.udm.serviceType "NodePort" }}
+{{- if .Values.config.udm.sbi.nodePort }}
+    nodePort: {{ .Values.config.udm.sbi.nodePort }}
 {{- end }}
 {{- end }}
 {{- end }}
diff --git a/omec/5g-control-plane/templates/service-udr.yaml b/omec/5g-control-plane/templates/service-udr.yaml
index 44e0c82..3c13170 100644
--- a/omec/5g-control-plane/templates/service-udr.yaml
+++ b/omec/5g-control-plane/templates/service-udr.yaml
@@ -13,40 +13,16 @@
   labels:
 {{ tuple "udr" . | include "5g-control-plane.metadata_labels" | indent 4 }}
 spec:
-  type: ClusterIP
+  type: {{ .Values.config.udr.serviceType }}
   selector:
 {{ tuple "udr" . | include "5g-control-plane.metadata_labels" | indent 4 }}
   ports:
-  - name: prometheus-exporter
-    port: {{ .Values.config.udr.prometheus.port }}
-    protocol: TCP
   - name: sbi
     port: {{ .Values.config.udr.sbi.port }}
     protocol: TCP
-{{- if or .Values.config.udr.prometheus.nodePort.enabled .Values.config.udr.sbi.nodePort.enabled }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: udr-external
-  labels:
-{{ tuple "udr" . | include "5g-control-plane.metadata_labels" | indent 4 }}
-spec:
-  type: NodePort
-  selector:
-{{ tuple "udr" . | include "5g-control-plane.metadata_labels" | indent 4 }}
-  ports:
-{{- if .Values.config.udr.prometheus.nodePort.enabled }}
-  - name: prometheus-exporter
-    port: {{ .Values.config.udr.prometheus.port }}
-    protocol: TCP
-    nodePort: {{ .Values.config.udr.prometheus.nodePort.port }}
-{{- end }}
-{{- if .Values.config.udr.sbi.nodePort.enabled }}
-  - name: sbi
-    port: {{ .Values.config.udr.sbi.port }}
-    protocol: TCP
-    nodePort: {{ .Values.config.udr.sbi.nodePort.port }}
+{{- if eq .Values.config.udr.serviceType "NodePort" }}
+{{- if .Values.config.udr.sbi.nodePort }}
+    nodePort: {{ .Values.config.udr.sbi.nodePort }}
 {{- end }}
 {{- end }}
 {{- end }}
diff --git a/omec/5g-control-plane/templates/service-webui.yaml b/omec/5g-control-plane/templates/service-webui.yaml
index 0afc3dc..b91e094 100644
--- a/omec/5g-control-plane/templates/service-webui.yaml
+++ b/omec/5g-control-plane/templates/service-webui.yaml
@@ -13,43 +13,24 @@
   labels:
 {{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }}
 spec:
-  type: ClusterIP
+  type: {{ .Values.config.webui.serviceType }}
   selector:
 {{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }}
   ports:
-  - name: prometheus-exporter
-    port: {{ .Values.config.webui.prometheus.port }}
-    protocol: TCP
   - name: urlport-http
     port: {{ .Values.config.webui.urlport.port }}
     protocol: TCP
+{{- if eq .Values.config.webui.serviceType "NodePort" }}
+{{- if .Values.config.webui.urlport.nodePort }}
+    nodePort: {{ .Values.config.webui.urlport.nodePort }}
+{{- end }}
+{{- end }}
   - name: grpc
     port: {{ .Values.config.webui.grpc.port }}
     protocol: TCP
-{{- if or .Values.config.webui.urlport.nodePort.enabled .Values.config.webui.prometheus.nodePort.enabled }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: webui-external
-  labels:
-{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }}
-spec:
-  type: NodePort
-  selector:
-{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }}
-  ports:
-{{- if .Values.config.webui.prometheus.nodePort.enabled }}
-  - name: prometheus-exporter
-    port: {{ .Values.config.webui.prometheus.port }}
-    protocol: TCP
-    nodePort: {{ .Values.config.webui.prometheus.nodePort.port }}
-{{- end }}
-{{- if .Values.config.webui.urlport.nodePort.enabled }}
-  - name: urlport-http
-    port: {{ .Values.config.webui.urlport.port }}
-    protocol: TCP
-    nodePort: {{ .Values.config.webui.urlport.nodePort.port }}
+{{- if eq .Values.config.webui.serviceType "NodePort" }}
+{{- if .Values.config.webui.grpc.nodePort }}
+    nodePort: {{ .Values.config.webui.grpc.nodePort }}
 {{- end }}
 {{- end }}
 {{- end }}
diff --git a/omec/5g-control-plane/values.yaml b/omec/5g-control-plane/values.yaml
index 0bcc19a..aa8f4d7 100644
--- a/omec/5g-control-plane/values.yaml
+++ b/omec/5g-control-plane/values.yaml
@@ -101,7 +101,7 @@
 
 config:
   managedByConfigPod:      # config comes from helm by default, if enabled true, then discard
-    enabled: false         # helm chart config and use the config from config Pod 
+    enabled: false         # helm chart config and use the config from config Pod
     syncUrl: ""            # Get the config from adapater in case control plane is down
   useExistingConfigMap: false
   coreDump:
@@ -187,18 +187,12 @@
       ReportCaller: false
   webui:
     deploy: true
-    podAnnotations:
-      field.cattle.io/workloadMetrics: '[{"path":"/metrics","port":9089,"schema":"HTTP"}]'
-    prometheus:
-      port: 9089
-      nodePort:
-        enabled: false
-        port: 30084
+    #podAnnotations:
+    serviceType: ClusterIP
     urlport:
       port: 5000
-      nodePort:
-        enabled: false
-        port: 35000
+      # Provide nodePort when serviceType is NodePort
+      #nodePort: 35000
     grpc:
       port: 9876
     ingress:
@@ -218,18 +212,12 @@
         configuration: {}
   udm:
     deploy: true
-    podAnnotations:
-      field.cattle.io/workloadMetrics: '[{"path":"/metrics","port":9089,"schema":"HTTP"}]'
-    prometheus:
-      port: 9089
-      nodePort:
-        enabled: false
-        port: 30084
+    #podAnnotations:
+    serviceType: ClusterIP
     sbi:
       port: 29503
-      nodePort:
-        enabled: false
-        port: 30074
+      # Provide nodePort when serviceType is NodePort
+      #nodePort: 30074
     cfgFiles:
       # https://github.com/free5gc/free5gc/blob/main/config/udmcfg.yaml
       udmcfg.conf:
@@ -259,18 +247,12 @@
                 udmProfileBHNPrivateKey: F1AB1074477EBCC7F554EA1C5FC368B1616730155E0041AC447D6301975FECDA
   udr:
     deploy: true
-    podAnnotations:
-      field.cattle.io/workloadMetrics: '[{"path":"/metrics","port":9089,"schema":"HTTP"}]'
-    prometheus:
-      port: 9089
-      nodePort:
-        enabled: false
-        port: 30084
+    #podAnnotations:
+    serviceType: ClusterIP
     sbi:
       port: 29504
-      nodePort:
-        enabled: false
-        port: 30074
+      # Provide nodePort when serviceType is NodePort
+      #nodePort: 30074
     cfgFiles:
       # https://github.com/free5gc/free5gc/blob/main/config/udrcfg.yaml
       udrcfg.conf:
@@ -285,18 +267,12 @@
             registerIPv4: udr
   pcf:
     deploy: true
-    podAnnotations:
-      field.cattle.io/workloadMetrics: '[{"path":"/metrics","port":9089,"schema":"HTTP"}]'
-    prometheus:
-      port: 9089
-      nodePort:
-        enabled: false
-        port: 30084
+    #podAnnotations:
+    serviceType: ClusterIP
     sbi:
       port: 29507
-      nodePort:
-        enabled: false
-        port: 30077
+      # Provide nodePort when serviceType is NodePort
+      #nodePort: 30077
     cfgFiles:
       # https://github.com/free5gc/free5gc/blob/main/config/pcfcfg.yaml
       pcfcfg.conf:
@@ -322,18 +298,12 @@
             - serviceName: npcf-ue-policy-control
   nssf:
     deploy: true
-    podAnnotations:
-      field.cattle.io/workloadMetrics: '[{"path":"/metrics","port":9089,"schema":"HTTP"}]'
-    prometheus:
-      port: 9089
-      nodePort:
-        enabled: false
-        port: 30084
+    #podAnnotations:
+    serviceType: ClusterIP
     sbi:
       port: 29531
-      nodePort:
-        enabled: false
-        port: 30081
+      # Provide nodePort when serviceType is NodePort
+      #nodePort: 30081
     cfgFiles:
       # https://github.com/free5gc/free5gc/blob/main/config/nssfcfg.yaml
       nssfcfg.conf:
@@ -371,22 +341,18 @@
     deploy: true
     podAnnotations:
       field.cattle.io/workloadMetrics: '[{"path":"/metrics","port":9089,"schema":"HTTP"}]'
+    serviceType: ClusterIP
     prometheus:
       port: 9089
-      nodePort:
-        enabled: false
-        port: 30084
+      # Provide nodePort when serviceType is NodePort
+      #nodePort: 30084
     sbi:
       port: 29518
-      nodePort:
-        enabled: false
-        port: 30088
+      #nodePort: 30088
     ngapp:
       #externalIp:
       port: 38412
-      nodePort:
-        enabled: true
-        port: 30071
+      #nodePort: 30071
     cfgFiles:
       # https://github.com/free5gc/free5gc/blob/main/config/amfcfg.yaml
       amfcfg.conf:
@@ -474,13 +440,12 @@
             maxRetryTimes: 4 # the max number of retransmission
   nrf:
     deploy: true
-    podAnnotations:
-      field.cattle.io/workloadMetrics: '[{"path":"/metrics","port":9089,"schema":"HTTP"}]'
+    #podAnnotations:
+    serviceType: ClusterIP
     sbi:
       port: 29510
-      nodePort:
-        enabled: false
-        port: 30070
+      # Provide nodePort when serviceType is NodePort
+      #nodePort: 30070
     cfgFiles:
       # https://github.com/free5gc/free5gc/blob/main/config/nrfcfg.yaml
       nrfcfg.conf:
@@ -502,21 +467,17 @@
     deploy: true
     podAnnotations:
       field.cattle.io/workloadMetrics: '[{"path":"/metrics","port":9089,"schema":"HTTP"}]'
+    serviceType: ClusterIP
     n4:
       port: 8805
-      nodePort:
-        enabled: false
-        port: 30021
+      # Provide nodePort when serviceType is NodePort
+      #nodePort: 30021
     prometheus:
       port: 9089
-      nodePort:
-        enabled: false
-        port: 30084
+      #nodePort: 30084
     sbi:
       port: 29502
-      nodePort:
-        enabled: false
-        port: 30080
+      #nodePort: 30080
     cfgFiles:
       uerouting.conf:
         info:
@@ -575,24 +536,18 @@
                     endpoints: # the IP address of this N3/N9 interface on this UPF
                       - upf
                     networkInstance: internet # Data Network Name (DNN)
-   
+
             links:
               - A: gNB1
                 B: UPF
   ausf:
     deploy: true
-    podAnnotations:
-      field.cattle.io/workloadMetrics: '[{"path":"/metrics","port":9089,"schema":"HTTP"}]'
-    prometheus:
-      port: 9089
-      nodePort:
-        enabled: false
-        port: 30084
+    #podAnnotations:
+    serviceType: ClusterIP
     sbi:
       port: 29509
-      nodePort:
-        enabled: false
-        port: 30082
+      # Provide nodePort when serviceType is NodePort
+      #nodePort: 30082
     cfgFiles:
       # https://github.com/free5gc/free5gc/blob/main/config/ausfcfg.yaml
       ausfcfg.conf: