blob: 5058b196a9c546388c51aa9a2a3d8f9a976bdda0 [file] [log] [blame]
badhri854c028b32021-11-03 18:24:05 -05001{{/*
2# Copyright 2020-present Open Networking Foundation
3
Ajay Lotan Thakur03189d22022-02-10 14:06:03 -06004# SPDX-License-Identifier: Apache-2.0
badhri854c028b32021-11-03 18:24:05 -05005*/}}
6
7{{- if .Values.config.pcrf.deploy }}
8---
9apiVersion: v1
10kind: Service
11metadata:
12 name: pcrf
13 labels:
14{{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
15spec:
16 selector:
17{{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
18 ports:
19 - name: gx
20 port: 3868
21 protocol: TCP
22 - name: prometheus-exporter
23 port: {{ .Values.config.pcrf.prometheus.port }}
24 protocol: TCP
25 - name: config-port
26 port: {{ .Values.config.pcrf.configPort.port }}
27 protocol: TCP
28---
29apiVersion: v1
30kind: Service
31metadata:
32 name: pcrf-headless
33 labels:
34{{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
35spec:
36 selector:
37{{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
38 clusterIP: None
39 ports:
40 - name: gx
41 port: 3868
42 protocol: TCP
43 - name: prometheus-exporter
44 port: {{ .Values.config.pcrf.prometheus.port }}
45 protocol: TCP
46 - name: config-port
47 port: {{ .Values.config.pcrf.configPort.port }}
48 protocol: TCP
49{{- if or (.Values.config.pcrf.prometheus.nodePort.enabled) (.Values.config.pcrf.gx.nodePort.enabled) }}
50---
51apiVersion: v1
52kind: Service
53metadata:
54 name: pcrf-external
55 labels:
56{{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
57spec:
58 selector:
59{{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
60 type: NodePort
61 ports:
62 {{- if .Values.config.pcrf.prometheus.nodePort.enabled }}
63 - name: prometheus-exporter
64 port: {{ .Values.config.pcrf.prometheus.port }}
65 protocol: TCP
66 nodePort: {{ .Values.config.pcrf.prometheus.nodePort.port }}
67 {{- end }}
68 {{- if .Values.config.pcrf.gx.nodePort.enabled }}
69 - name: gx
70 port: 3868
71 protocol: TCP
72 nodePort: {{ .Values.config.pcrf.gx.nodePort.port }}
73 {{- end }}
74 {{- if .Values.config.pcrf.configPort.nodePort.enabled }}
75 - name: config-port
76 port: {{ .Values.config.pcrf.configPort.port }}
77 protocol: TCP
78 nodePort: {{ .Values.config.pcrf.configPort.nodePort.port }}
79 {{- end }}
80{{- end }}
81{{- end }}