blob: 233041113eb2b210b91c35b779f3d32de3e73673 [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
29---
30apiVersion: v1
31kind: Service
32metadata:
33 name: amf-headless
34 labels:
35{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
36spec:
37 clusterIP: None
38 selector:
39{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
40{{- if or .Values.config.amf.prometheus.nodePort.enabled .Values.config.amf.sbi.nodePort.enabled .Values.config.amf.ngapp.nodePort.enabled }}
41---
42apiVersion: v1
43kind: Service
44metadata:
45 name: amf-external
46 labels:
47{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
48spec:
49 type: NodePort
50 selector:
51{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
52 ports:
53{{- if .Values.config.amf.prometheus.nodePort.enabled }}
54 - name: prometheus-exporter
55 port: {{ .Values.config.amf.prometheus.port }}
56 protocol: TCP
57 nodePort: {{ .Values.config.amf.prometheus.nodePort.port }}
58{{- end }}
59{{- if .Values.config.amf.sbi.nodePort.enabled }}
60 - name: sbi
61 port: {{ .Values.config.amf.sbi.port }}
62 protocol: TCP
63 nodePort: {{ .Values.config.amf.sbi.nodePort.port }}
64{{- end }}
65{{- if .Values.config.amf.ngapp.nodePort.enabled }}
66 - name: ngapp
67 port: {{ .Values.config.amf.ngapp.port }}
68 protocol: SCTP
69 nodePort: {{ .Values.config.amf.ngapp.nodePort.port }}
70{{- end }}
71{{- end }}
72{{- end }}