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.smf.deploy }} |
| 8 | --- |
| 9 | apiVersion: v1 |
| 10 | kind: Service |
| 11 | metadata: |
| 12 | name: smf |
| 13 | labels: |
| 14 | {{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 15 | spec: |
| 16 | type: ClusterIP |
| 17 | selector: |
| 18 | {{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 19 | ports: |
| 20 | - name: pfcp |
| 21 | port: {{ .Values.config.smf.n4.port }} |
| 22 | protocol: UDP |
| 23 | - name: prometheus-exporter |
| 24 | port: {{ .Values.config.smf.prometheus.port }} |
| 25 | protocol: TCP |
| 26 | - name: sbi |
| 27 | port: {{ .Values.config.smf.sbi.port }} |
| 28 | protocol: TCP |
Badhrinath | 987e1d8 | 2020-11-20 13:23:58 -0600 | [diff] [blame] | 29 | {{- if or .Values.config.smf.n4.nodePort.enabled .Values.config.smf.prometheus.nodePort.enabled .Values.config.smf.sbi.nodePort.enabled }} |
| 30 | --- |
| 31 | apiVersion: v1 |
| 32 | kind: Service |
| 33 | metadata: |
| 34 | name: smf-external |
| 35 | labels: |
| 36 | {{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 37 | spec: |
| 38 | type: NodePort |
| 39 | selector: |
| 40 | {{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 41 | ports: |
| 42 | {{- if .Values.config.smf.n4.nodePort.enabled }} |
| 43 | - name: pfcp |
| 44 | port: {{ .Values.config.smf.n4.port }} |
| 45 | protocol: UDP |
| 46 | nodePort: {{ .Values.config.smf.n4.nodePort.port }} |
| 47 | {{- end }} |
| 48 | {{- if .Values.config.smf.prometheus.nodePort.enabled }} |
| 49 | - name: prometheus-exporter |
| 50 | port: {{ .Values.config.smf.prometheus.port }} |
| 51 | protocol: TCP |
| 52 | nodePort: {{ .Values.config.smf.prometheus.nodePort.port }} |
| 53 | {{- end }} |
| 54 | {{- if .Values.config.smf.sbi.nodePort.enabled }} |
| 55 | - name: sbi |
| 56 | port: {{ .Values.config.smf.sbi.port }} |
| 57 | protocol: TCP |
| 58 | nodePort: {{ .Values.config.smf.sbi.nodePort.port }} |
| 59 | {{- end }} |
| 60 | {{- end }} |
| 61 | {{- end }} |