blob: eafadf5e649c44bd4de0ad34e10c6e6373d41a79 [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 Padmanabhanb8f42912022-11-16 13:58:04 -050015{{- with .Values.config.amf.serviceAnnotations }}
Badhrinath Padmanabhanbf5738b2022-10-31 21:04:36 -050016 annotations:
Badhrinath Padmanabhanb8f42912022-11-16 13:58:04 -050017 {{- toYaml . | nindent 4 }}
18{{- end }}
badhri854c028b32021-11-03 18:24:05 -050019spec:
20 type: {{ .Values.config.amf.serviceType }}
21{{- if .Values.config.amf.ngapp.externalIp }}
22 externalIPs:
23 - {{ .Values.config.amf.ngapp.externalIp }}
24{{- end }}
25 selector:
26{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
27 ports:
28 - name: prometheus-exporter
29 port: {{ .Values.config.amf.prometheus.port }}
30 protocol: TCP
31{{- if eq .Values.config.amf.serviceType "NodePort" }}
32{{- if .Values.config.amf.prometheus.nodePort }}
33 nodePort: {{ .Values.config.amf.prometheus.nodePort }}
34{{- end }}
35{{- end }}
36 - name: sbi
37 port: {{ .Values.config.amf.sbi.port }}
38 protocol: TCP
39{{- if eq .Values.config.amf.serviceType "NodePort" }}
40{{- if .Values.config.amf.sbi.nodePort }}
41 nodePort: {{ .Values.config.amf.sbi.nodePort }}
42{{- end }}
43{{- end }}
44 - name: ngapp
45 port: {{ .Values.config.amf.ngapp.port }}
46 protocol: SCTP
47{{- if eq .Values.config.amf.serviceType "NodePort" }}
48{{- if .Values.config.amf.ngapp.nodePort }}
49 nodePort: {{ .Values.config.amf.ngapp.nodePort }}
50{{- end }}
51{{- end }}
Ajay Lotan Thakur6de3b782022-04-14 08:41:12 -060052 - name: sctp-grpc
53 port: {{ .Values.config.amf.sctp_grpc.port }}
54 protocol: TCP
55{{- if eq .Values.config.amf.serviceType "NodePort" }}
56{{- if .Values.config.amf.sctp_grpc.nodePort }}
57 nodePort: {{ .Values.config.amf.sctp_grpc.nodePort }}
58{{- end }}
59{{- end }}
60---
61apiVersion: v1
62kind: Service
63metadata:
64 name: amf-headless
65 labels:
66{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
67spec:
68 selector:
69{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
70 clusterIP: None
71 ports:
72 - name: grpc
73 port: 9000
74 protocol: TCP
badhri854c028b32021-11-03 18:24:05 -050075{{- end }}