blob: 520d8a22f75cb6d08307ca6ad81047991cf3e642 [file] [log] [blame]
Badhrinath Pa3a3088a2020-07-28 18:37:16 -07001{{/*
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---
10apiVersion: v1
11kind: Service
12metadata:
13 name: pfcp-agent
14 labels:
15{{ tuple "pfcp-agent" . | include "omec-pfcp-agent.metadata_labels" | indent 4 }}
16spec:
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---
28apiVersion: v1
29kind: Service
30metadata:
31 name: pfcp-headless
32 labels:
33{{ tuple "pfcp-agent" . | include "omec-pfcp-agent.metadata_labels" | indent 4 }}
34spec:
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---
48apiVersion: v1
49kind: Service
50metadata:
51 name: pfcp-external
52 labels:
53{{ tuple "pfcp-agent" . | include "omec-pfcp-agent.metadata_labels" | indent 4 }}
54spec:
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 }}