blob: 467c2eae7f814a5ae5843996082a8fb07db38109 [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.smf.deploy }}
8---
9apiVersion: v1
10kind: Service
11metadata:
12 name: smf
13 labels:
14{{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
15spec:
16 type: ClusterIP
17 selector:
18{{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
19 ports:
20 - name: pfcp
21 port: {{ .Values.config.smf.n4.port }}
22 protocol: UDP
23 - name: prometheus-exporter
24 port: {{ .Values.config.smf.prometheus.port }}
25 protocol: TCP
26 - name: sbi
27 port: {{ .Values.config.smf.sbi.port }}
28 protocol: TCP
29---
30apiVersion: v1
31kind: Service
32metadata:
33 name: smf-headless
34 labels:
35{{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
36spec:
37 clusterIP: None
38 selector:
39{{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
40{{- if or .Values.config.smf.n4.nodePort.enabled .Values.config.smf.prometheus.nodePort.enabled .Values.config.smf.sbi.nodePort.enabled }}
41---
42apiVersion: v1
43kind: Service
44metadata:
45 name: smf-external
46 labels:
47{{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
48spec:
49 type: NodePort
50 selector:
51{{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
52 ports:
53{{- if .Values.config.smf.n4.nodePort.enabled }}
54 - name: pfcp
55 port: {{ .Values.config.smf.n4.port }}
56 protocol: UDP
57 nodePort: {{ .Values.config.smf.n4.nodePort.port }}
58{{- end }}
59{{- if .Values.config.smf.prometheus.nodePort.enabled }}
60 - name: prometheus-exporter
61 port: {{ .Values.config.smf.prometheus.port }}
62 protocol: TCP
63 nodePort: {{ .Values.config.smf.prometheus.nodePort.port }}
64{{- end }}
65{{- if .Values.config.smf.sbi.nodePort.enabled }}
66 - name: sbi
67 port: {{ .Values.config.smf.sbi.port }}
68 protocol: TCP
69 nodePort: {{ .Values.config.smf.sbi.nodePort.port }}
70{{- end }}
71{{- end }}
72{{- end }}