blob: 068d706dd2c23f7c16c59a82173bac2860008a3a [file] [log] [blame]
badhri854c028b32021-11-03 18:24:05 -05001{{/*
2# Copyright 2020-present Open Networking Foundation
3
Ajay Lotan Thakur03189d22022-02-10 14:06:03 -06004# SPDX-License-Identifier: Apache-2.0
badhri854c028b32021-11-03 18:24:05 -05005*/}}
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 }}
Badhrinath Padmanabhanbf5738b2022-10-31 21:04:36 -050015 annotations:
16 external-dns.beta.kubernetes.io/hostname: {{ .Values.config.amf.serviceAnnotations.amfFqdn }}
badhri854c028b32021-11-03 18:24:05 -050017spec:
18 type: {{ .Values.config.amf.serviceType }}
19{{- if .Values.config.amf.ngapp.externalIp }}
20 externalIPs:
21 - {{ .Values.config.amf.ngapp.externalIp }}
22{{- end }}
23 selector:
24{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
25 ports:
26 - name: prometheus-exporter
27 port: {{ .Values.config.amf.prometheus.port }}
28 protocol: TCP
29{{- if eq .Values.config.amf.serviceType "NodePort" }}
30{{- if .Values.config.amf.prometheus.nodePort }}
31 nodePort: {{ .Values.config.amf.prometheus.nodePort }}
32{{- end }}
33{{- end }}
34 - name: sbi
35 port: {{ .Values.config.amf.sbi.port }}
36 protocol: TCP
37{{- if eq .Values.config.amf.serviceType "NodePort" }}
38{{- if .Values.config.amf.sbi.nodePort }}
39 nodePort: {{ .Values.config.amf.sbi.nodePort }}
40{{- end }}
41{{- end }}
42 - name: ngapp
43 port: {{ .Values.config.amf.ngapp.port }}
44 protocol: SCTP
45{{- if eq .Values.config.amf.serviceType "NodePort" }}
46{{- if .Values.config.amf.ngapp.nodePort }}
47 nodePort: {{ .Values.config.amf.ngapp.nodePort }}
48{{- end }}
49{{- end }}
Ajay Lotan Thakur6de3b782022-04-14 08:41:12 -060050 - name: sctp-grpc
51 port: {{ .Values.config.amf.sctp_grpc.port }}
52 protocol: TCP
53{{- if eq .Values.config.amf.serviceType "NodePort" }}
54{{- if .Values.config.amf.sctp_grpc.nodePort }}
55 nodePort: {{ .Values.config.amf.sctp_grpc.nodePort }}
56{{- end }}
57{{- end }}
58---
59apiVersion: v1
60kind: Service
61metadata:
62 name: amf-headless
63 labels:
64{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
65spec:
66 selector:
67{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
68 clusterIP: None
69 ports:
70 - name: grpc
71 port: 9000
72 protocol: TCP
badhri854c028b32021-11-03 18:24:05 -050073{{- end }}