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 | b8f4291 | 2022-11-16 13:58:04 -0500 | [diff] [blame] | 15 | {{- with .Values.config.amf.serviceAnnotations }} |
Badhrinath Padmanabhan | bf5738b | 2022-10-31 21:04:36 -0500 | [diff] [blame] | 16 | annotations: |
Badhrinath Padmanabhan | b8f4291 | 2022-11-16 13:58:04 -0500 | [diff] [blame] | 17 | {{- toYaml . | nindent 4 }} |
| 18 | {{- end }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 19 | spec: |
| 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 Thakur | 6de3b78 | 2022-04-14 08:41:12 -0600 | [diff] [blame] | 52 | - 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 | --- |
| 61 | apiVersion: v1 |
| 62 | kind: Service |
| 63 | metadata: |
| 64 | name: amf-headless |
| 65 | labels: |
| 66 | {{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 67 | spec: |
| 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 |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 75 | {{- end }} |