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 |
| 29 | --- |
| 30 | apiVersion: v1 |
| 31 | kind: Service |
| 32 | metadata: |
| 33 | name: amf-headless |
| 34 | labels: |
| 35 | {{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 36 | spec: |
| 37 | clusterIP: None |
| 38 | selector: |
| 39 | {{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 40 | {{- if or .Values.config.amf.prometheus.nodePort.enabled .Values.config.amf.sbi.nodePort.enabled .Values.config.amf.ngapp.nodePort.enabled }} |
| 41 | --- |
| 42 | apiVersion: v1 |
| 43 | kind: Service |
| 44 | metadata: |
| 45 | name: amf-external |
| 46 | labels: |
| 47 | {{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 48 | spec: |
| 49 | type: NodePort |
| 50 | selector: |
| 51 | {{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 52 | ports: |
| 53 | {{- if .Values.config.amf.prometheus.nodePort.enabled }} |
| 54 | - name: prometheus-exporter |
| 55 | port: {{ .Values.config.amf.prometheus.port }} |
| 56 | protocol: TCP |
| 57 | nodePort: {{ .Values.config.amf.prometheus.nodePort.port }} |
| 58 | {{- end }} |
| 59 | {{- if .Values.config.amf.sbi.nodePort.enabled }} |
| 60 | - name: sbi |
| 61 | port: {{ .Values.config.amf.sbi.port }} |
| 62 | protocol: TCP |
| 63 | nodePort: {{ .Values.config.amf.sbi.nodePort.port }} |
| 64 | {{- end }} |
| 65 | {{- if .Values.config.amf.ngapp.nodePort.enabled }} |
| 66 | - name: ngapp |
| 67 | port: {{ .Values.config.amf.ngapp.port }} |
| 68 | protocol: SCTP |
| 69 | nodePort: {{ .Values.config.amf.ngapp.nodePort.port }} |
| 70 | {{- end }} |
| 71 | {{- end }} |
| 72 | {{- end }} |