badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright 2019-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.spgwc.deploy }} |
| 8 | --- |
| 9 | apiVersion: v1 |
| 10 | kind: Service |
| 11 | metadata: |
| 12 | name: spgwc |
| 13 | labels: |
| 14 | {{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 15 | spec: |
| 16 | type: ClusterIP |
| 17 | selector: |
| 18 | {{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 19 | ports: |
| 20 | - name: s11 |
| 21 | port: {{ .Values.config.spgwc.s11.port }} |
| 22 | protocol: UDP |
| 23 | - name: pfcp |
| 24 | port: {{ .Values.config.spgwc.n4.port }} |
| 25 | protocol: UDP |
| 26 | - name: prometheus-exporter |
| 27 | port: {{ .Values.config.spgwc.prometheus.port }} |
| 28 | protocol: TCP |
| 29 | - name: rest |
| 30 | port: {{ .Values.config.spgwc.rest.port }} |
| 31 | protocol: TCP |
| 32 | --- |
| 33 | apiVersion: v1 |
| 34 | kind: Service |
| 35 | metadata: |
| 36 | name: spgwc-headless |
| 37 | labels: |
| 38 | {{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 39 | spec: |
| 40 | clusterIP: None |
| 41 | selector: |
| 42 | {{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 43 | {{- if or .Values.config.spgwc.s11.nodePort.enabled .Values.config.spgwc.n4.nodePort.enabled .Values.config.spgwc.prometheus.nodePort.enabled .Values.config.spgwc.rest.nodePort.enabled }} |
| 44 | --- |
| 45 | apiVersion: v1 |
| 46 | kind: Service |
| 47 | metadata: |
| 48 | name: spgwc-external |
| 49 | labels: |
| 50 | {{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 51 | spec: |
| 52 | type: NodePort |
| 53 | selector: |
| 54 | {{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 55 | ports: |
| 56 | {{- if .Values.config.spgwc.s11.nodePort.enabled }} |
| 57 | - name: s11 |
| 58 | port: {{ .Values.config.spgwc.s11.port }} |
| 59 | protocol: UDP |
| 60 | nodePort: {{ .Values.config.spgwc.s11.nodePort.port }} |
| 61 | {{- end }} |
| 62 | {{- if .Values.config.spgwc.n4.nodePort.enabled }} |
| 63 | - name: pfcp |
| 64 | port: {{ .Values.config.spgwc.n4.port }} |
| 65 | protocol: UDP |
| 66 | nodePort: {{ .Values.config.spgwc.n4.nodePort.port }} |
| 67 | {{- end }} |
| 68 | {{- if .Values.config.spgwc.prometheus.nodePort.enabled }} |
| 69 | - name: prometheus-exporter |
| 70 | port: {{ .Values.config.spgwc.prometheus.port }} |
| 71 | protocol: TCP |
| 72 | nodePort: {{ .Values.config.spgwc.prometheus.nodePort.port }} |
| 73 | {{- end }} |
| 74 | {{- if .Values.config.spgwc.rest.nodePort.enabled }} |
| 75 | - name: rest |
| 76 | port: {{ .Values.config.spgwc.rest.port }} |
| 77 | protocol: TCP |
| 78 | nodePort: {{ .Values.config.spgwc.rest.nodePort.port }} |
| 79 | {{- end }} |
| 80 | {{- end }} |
| 81 | {{- end }} |