badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright 2020-present Open Networking Foundation |
| 3 | |
Ajay Lotan Thakur | 03189d2 | 2022-02-10 14:06:03 -0600 | [diff] [blame] | 4 | # SPDX-License-Identifier: Apache-2.0 |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 5 | */}} |
| 6 | |
| 7 | {{- if .Values.config.amf.deploy }} |
| 8 | --- |
| 9 | apiVersion: v1 |
| 10 | kind: Service |
| 11 | metadata: |
| 12 | name: amf |
| 13 | labels: |
| 14 | {{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
Badhrinath Padmanabhan | bf5738b | 2022-10-31 21:04:36 -0500 | [diff] [blame] | 15 | annotations: |
| 16 | external-dns.beta.kubernetes.io/hostname: {{ .Values.config.amf.serviceAnnotations.amfFqdn }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 17 | spec: |
| 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 Thakur | 6de3b78 | 2022-04-14 08:41:12 -0600 | [diff] [blame] | 50 | - 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 | --- |
| 59 | apiVersion: v1 |
| 60 | kind: Service |
| 61 | metadata: |
| 62 | name: amf-headless |
| 63 | labels: |
| 64 | {{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 65 | spec: |
| 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 |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 73 | {{- end }} |