blob: 068d706dd2c23f7c16c59a82173bac2860008a3a [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 }}
annotations:
external-dns.beta.kubernetes.io/hostname: {{ .Values.config.amf.serviceAnnotations.amfFqdn }}
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 }}