Badhrinath Pa | 3a3088a | 2020-07-28 18:37:16 -0700 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright 2019-present Open Networking Foundation |
| 3 | # Copyright 2019 Intel Corporation |
| 4 | |
| 5 | # SPDX-License-Identifier: Apache-2.0 |
| 6 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| 7 | */}} |
| 8 | |
| 9 | --- |
| 10 | apiVersion: v1 |
| 11 | kind: Service |
| 12 | metadata: |
| 13 | name: pfcp-agent |
| 14 | labels: |
| 15 | {{ tuple "pfcp-agent" . | include "omec-pfcp-agent.metadata_labels" | indent 4 }} |
| 16 | spec: |
| 17 | selector: |
| 18 | {{ tuple "pfcp-agent" . | include "omec-pfcp-agent.metadata_labels" | indent 4 }} |
| 19 | ports: |
| 20 | - name: dp-comm |
| 21 | port: {{ .Values.config.pfcpAgent.dpComm.port }} |
| 22 | {{- if .Values.config.pfcpAgent.multiUpfs }} |
| 23 | protocol: TCP |
| 24 | {{- else }} |
| 25 | protocol: UDP |
| 26 | {{- end }} |
| 27 | --- |
| 28 | apiVersion: v1 |
| 29 | kind: Service |
| 30 | metadata: |
| 31 | name: pfcp-headless |
| 32 | labels: |
| 33 | {{ tuple "pfcp-agent" . | include "omec-pfcp-agent.metadata_labels" | indent 4 }} |
| 34 | spec: |
| 35 | clusterIP: None |
| 36 | selector: |
| 37 | {{ tuple "pfcp-agent" . | include "omec-pfcp-agent.metadata_labels" | indent 4 }} |
| 38 | ports: |
| 39 | - name: dp-comm |
| 40 | port: {{ .Values.config.pfcpAgent.dpComm.port }} |
| 41 | {{- if .Values.config.pfcpAgent.multiUpfs }} |
| 42 | protocol: TCP |
| 43 | {{- else }} |
| 44 | protocol: UDP |
| 45 | {{- end }} |
| 46 | {{- if and (not .Values.config.pfcpAgent.multiUpfs) .Values.config.pfcpAgent.dpComm.nodePort.enabled }} |
| 47 | --- |
| 48 | apiVersion: v1 |
| 49 | kind: Service |
| 50 | metadata: |
| 51 | name: pfcp-external |
| 52 | labels: |
| 53 | {{ tuple "pfcp-agent" . | include "omec-pfcp-agent.metadata_labels" | indent 4 }} |
| 54 | spec: |
| 55 | selector: |
| 56 | {{ tuple "pfcp-agent" . | include "omec-pfcp-agent.metadata_labels" | indent 4 }} |
| 57 | type: NodePort |
| 58 | ports: |
| 59 | - name: dp-comm |
| 60 | port: {{ .Values.config.pfcpAgent.dpComm.port }} |
| 61 | protocol: UDP |
| 62 | nodePort: {{ .Values.config.pfcpAgent.dpComm.nodePort.port }} |
| 63 | {{- end }} |