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