blob: c2269b7f3e7d49c633562bdbf36a3c8d60f96c6f [file] [log] [blame]
Badhrinath987e1d82020-11-20 13:23:58 -06001{{/*
2# Copyright 2020-present Open Networking Foundation
3
4# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
5*/}}
6
7{{- if .Values.config.udm.deploy }}
8---
9apiVersion: v1
10kind: Service
11metadata:
12 name: udm
13 labels:
14{{ tuple "udm" . | include "5g-control-plane.metadata_labels" | indent 4 }}
15spec:
16 type: ClusterIP
17 selector:
18{{ tuple "udm" . | include "5g-control-plane.metadata_labels" | indent 4 }}
19 ports:
20 - name: prometheus-exporter
21 port: {{ .Values.config.udm.prometheus.port }}
22 protocol: TCP
23 - name: sbi
24 port: {{ .Values.config.udm.sbi.port }}
25 protocol: TCP
Badhrinath987e1d82020-11-20 13:23:58 -060026{{- if or .Values.config.udm.prometheus.nodePort.enabled .Values.config.udm.sbi.nodePort.enabled }}
27---
28apiVersion: v1
29kind: Service
30metadata:
31 name: udm-external
32 labels:
33{{ tuple "udm" . | include "5g-control-plane.metadata_labels" | indent 4 }}
34spec:
35 type: NodePort
36 selector:
37{{ tuple "udm" . | include "5g-control-plane.metadata_labels" | indent 4 }}
38 ports:
39{{- if .Values.config.udm.prometheus.nodePort.enabled }}
40 - name: prometheus-exporter
41 port: {{ .Values.config.udm.prometheus.port }}
42 protocol: TCP
43 nodePort: {{ .Values.config.udm.prometheus.nodePort.port }}
44{{- end }}
45{{- if .Values.config.udm.sbi.nodePort.enabled }}
46 - name: sbi
47 port: {{ .Values.config.udm.sbi.port }}
48 protocol: TCP
49 nodePort: {{ .Values.config.udm.sbi.nodePort.port }}
50{{- end }}
51{{- end }}
52{{- end }}