Badhrinath | 987e1d8 | 2020-11-20 13:23:58 -0600 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright 2020-present Open Networking Foundation |
| 3 | |
| 4 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| 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: ClusterIP |
| 17 | selector: |
| 18 | {{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 19 | ports: |
| 20 | - name: prometheus-exporter |
| 21 | port: {{ .Values.config.amf.prometheus.port }} |
| 22 | protocol: TCP |
| 23 | - name: sbi |
| 24 | port: {{ .Values.config.amf.sbi.port }} |
| 25 | protocol: TCP |
| 26 | - name: ngapp |
| 27 | port: {{ .Values.config.amf.ngapp.port }} |
| 28 | protocol: SCTP |
Badhrinath | 987e1d8 | 2020-11-20 13:23:58 -0600 | [diff] [blame] | 29 | {{- if or .Values.config.amf.prometheus.nodePort.enabled .Values.config.amf.sbi.nodePort.enabled .Values.config.amf.ngapp.nodePort.enabled }} |
| 30 | --- |
| 31 | apiVersion: v1 |
| 32 | kind: Service |
| 33 | metadata: |
| 34 | name: amf-external |
| 35 | labels: |
| 36 | {{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 37 | spec: |
| 38 | type: NodePort |
Hyunsun Moon | 841690e | 2021-05-20 19:26:03 -0700 | [diff] [blame] | 39 | {{- if .Values.config.amf.ngapp.externalIp }} |
| 40 | externalIPs: |
| 41 | - {{ .Values.config.amf.ngapp.externalIp }} |
| 42 | {{- end }} |
Badhrinath | 987e1d8 | 2020-11-20 13:23:58 -0600 | [diff] [blame] | 43 | selector: |
| 44 | {{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 45 | ports: |
| 46 | {{- if .Values.config.amf.prometheus.nodePort.enabled }} |
| 47 | - name: prometheus-exporter |
| 48 | port: {{ .Values.config.amf.prometheus.port }} |
| 49 | protocol: TCP |
| 50 | nodePort: {{ .Values.config.amf.prometheus.nodePort.port }} |
| 51 | {{- end }} |
| 52 | {{- if .Values.config.amf.sbi.nodePort.enabled }} |
| 53 | - name: sbi |
| 54 | port: {{ .Values.config.amf.sbi.port }} |
| 55 | protocol: TCP |
| 56 | nodePort: {{ .Values.config.amf.sbi.nodePort.port }} |
| 57 | {{- end }} |
| 58 | {{- if .Values.config.amf.ngapp.nodePort.enabled }} |
| 59 | - name: ngapp |
| 60 | port: {{ .Values.config.amf.ngapp.port }} |
| 61 | protocol: SCTP |
| 62 | nodePort: {{ .Values.config.amf.ngapp.nodePort.port }} |
| 63 | {{- end }} |
| 64 | {{- end }} |
| 65 | {{- end }} |