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 }} |
| 15 | spec: |
| 16 | type: {{ .Values.config.amf.serviceType }} |
| 17 | {{- if .Values.config.amf.ngapp.externalIp }} |
| 18 | externalIPs: |
| 19 | - {{ .Values.config.amf.ngapp.externalIp }} |
| 20 | {{- end }} |
| 21 | selector: |
| 22 | {{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 23 | ports: |
| 24 | - name: prometheus-exporter |
| 25 | port: {{ .Values.config.amf.prometheus.port }} |
| 26 | protocol: TCP |
| 27 | {{- if eq .Values.config.amf.serviceType "NodePort" }} |
| 28 | {{- if .Values.config.amf.prometheus.nodePort }} |
| 29 | nodePort: {{ .Values.config.amf.prometheus.nodePort }} |
| 30 | {{- end }} |
| 31 | {{- end }} |
| 32 | - name: sbi |
| 33 | port: {{ .Values.config.amf.sbi.port }} |
| 34 | protocol: TCP |
| 35 | {{- if eq .Values.config.amf.serviceType "NodePort" }} |
| 36 | {{- if .Values.config.amf.sbi.nodePort }} |
| 37 | nodePort: {{ .Values.config.amf.sbi.nodePort }} |
| 38 | {{- end }} |
| 39 | {{- end }} |
| 40 | - name: ngapp |
| 41 | port: {{ .Values.config.amf.ngapp.port }} |
| 42 | protocol: SCTP |
| 43 | {{- if eq .Values.config.amf.serviceType "NodePort" }} |
| 44 | {{- if .Values.config.amf.ngapp.nodePort }} |
| 45 | nodePort: {{ .Values.config.amf.ngapp.nodePort }} |
| 46 | {{- end }} |
| 47 | {{- end }} |
Ajay Lotan Thakur | 6de3b78 | 2022-04-14 08:41:12 -0600 | [diff] [blame] | 48 | - name: sctp-grpc |
| 49 | port: {{ .Values.config.amf.sctp_grpc.port }} |
| 50 | protocol: TCP |
| 51 | {{- if eq .Values.config.amf.serviceType "NodePort" }} |
| 52 | {{- if .Values.config.amf.sctp_grpc.nodePort }} |
| 53 | nodePort: {{ .Values.config.amf.sctp_grpc.nodePort }} |
| 54 | {{- end }} |
| 55 | {{- end }} |
| 56 | --- |
| 57 | apiVersion: v1 |
| 58 | kind: Service |
| 59 | metadata: |
| 60 | name: amf-headless |
| 61 | labels: |
| 62 | {{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 63 | spec: |
| 64 | selector: |
| 65 | {{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 66 | clusterIP: None |
| 67 | ports: |
| 68 | - name: grpc |
| 69 | port: 9000 |
| 70 | protocol: TCP |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 71 | {{- end }} |