blob: 5e37bdf88e3de08ac81714bc5f1e0b22c9581c67 [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.amf.deploy }}
8---
9apiVersion: v1
10kind: Service
11metadata:
12 name: amf
13 labels:
14{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
15spec:
16 type: ClusterIP
17 selector:
18{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
19 ports:
20 - name: prometheus-exporter
21 port: {{ .Values.config.amf.prometheus.port }}
22 protocol: TCP
23 - name: sbi
24 port: {{ .Values.config.amf.sbi.port }}
25 protocol: TCP
26 - name: ngapp
27 port: {{ .Values.config.amf.ngapp.port }}
28 protocol: SCTP
Badhrinath987e1d82020-11-20 13:23:58 -060029{{- if or .Values.config.amf.prometheus.nodePort.enabled .Values.config.amf.sbi.nodePort.enabled .Values.config.amf.ngapp.nodePort.enabled }}
30---
31apiVersion: v1
32kind: Service
33metadata:
34 name: amf-external
35 labels:
36{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
37spec:
38 type: NodePort
39 selector:
40{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
41 ports:
42{{- if .Values.config.amf.prometheus.nodePort.enabled }}
43 - name: prometheus-exporter
44 port: {{ .Values.config.amf.prometheus.port }}
45 protocol: TCP
46 nodePort: {{ .Values.config.amf.prometheus.nodePort.port }}
47{{- end }}
48{{- if .Values.config.amf.sbi.nodePort.enabled }}
49 - name: sbi
50 port: {{ .Values.config.amf.sbi.port }}
51 protocol: TCP
52 nodePort: {{ .Values.config.amf.sbi.nodePort.port }}
53{{- end }}
54{{- if .Values.config.amf.ngapp.nodePort.enabled }}
55 - name: ngapp
56 port: {{ .Values.config.amf.ngapp.port }}
57 protocol: SCTP
58 nodePort: {{ .Values.config.amf.ngapp.nodePort.port }}
59{{- end }}
60{{- end }}
61{{- end }}