blob: eafadf5e649c44bd4de0ad34e10c6e6373d41a79 [file] [log] [blame]
{{/*
# Copyright 2020-present Open Networking Foundation
# SPDX-License-Identifier: Apache-2.0
*/}}
{{- if .Values.config.amf.deploy }}
---
apiVersion: v1
kind: Service
metadata:
name: amf
labels:
{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
{{- with .Values.config.amf.serviceAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.config.amf.serviceType }}
{{- if .Values.config.amf.ngapp.externalIp }}
externalIPs:
- {{ .Values.config.amf.ngapp.externalIp }}
{{- end }}
selector:
{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
ports:
- name: prometheus-exporter
port: {{ .Values.config.amf.prometheus.port }}
protocol: TCP
{{- if eq .Values.config.amf.serviceType "NodePort" }}
{{- if .Values.config.amf.prometheus.nodePort }}
nodePort: {{ .Values.config.amf.prometheus.nodePort }}
{{- end }}
{{- end }}
- name: sbi
port: {{ .Values.config.amf.sbi.port }}
protocol: TCP
{{- if eq .Values.config.amf.serviceType "NodePort" }}
{{- if .Values.config.amf.sbi.nodePort }}
nodePort: {{ .Values.config.amf.sbi.nodePort }}
{{- end }}
{{- end }}
- name: ngapp
port: {{ .Values.config.amf.ngapp.port }}
protocol: SCTP
{{- if eq .Values.config.amf.serviceType "NodePort" }}
{{- if .Values.config.amf.ngapp.nodePort }}
nodePort: {{ .Values.config.amf.ngapp.nodePort }}
{{- end }}
{{- end }}
- name: sctp-grpc
port: {{ .Values.config.amf.sctp_grpc.port }}
protocol: TCP
{{- if eq .Values.config.amf.serviceType "NodePort" }}
{{- if .Values.config.amf.sctp_grpc.nodePort }}
nodePort: {{ .Values.config.amf.sctp_grpc.nodePort }}
{{- end }}
{{- end }}
---
apiVersion: v1
kind: Service
metadata:
name: amf-headless
labels:
{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
spec:
selector:
{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
clusterIP: None
ports:
- name: grpc
port: 9000
protocol: TCP
{{- end }}