blob: 2c9b89729d2d1ad37fc5705505efcdd1c2bd17f7 [file] [log] [blame]
Ajay Lotan Thakurc3cd6192020-10-12 20:12:38 -05001{{/*
2# Copyright 2020-present Open Networking Foundation
3
4# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
5*/}}
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---
26apiVersion: v1
27kind: Service
28metadata:
29 name: pcrf-headless
30 labels:
31{{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
32spec:
33 selector:
34{{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
35 clusterIP: None
36 ports:
37 - name: gx
38 port: 3868
39 protocol: TCP
Ajay Lotan Thakurcd372a22020-12-11 14:36:26 -070040 - name: prometheus-exporter
41 port: {{ .Values.config.pcrf.prometheus.port }}
42 protocol: TCP
43
Ajay Lotan Thakurc3cd6192020-10-12 20:12:38 -050044---
45{{- if or (.Values.config.pcrf.prometheus.nodePort.enabled) (.Values.config.pcrf.gx.nodePort.enabled) }}
46apiVersion: v1
47kind: Service
48metadata:
49 name: pcrf-external
50 labels:
51{{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
52spec:
53 selector:
54{{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
55 type: NodePort
56 ports:
57 {{- if .Values.config.pcrf.prometheus.nodePort.enabled }}
58 - name: prometheus-exporter
59 port: {{ .Values.config.pcrf.prometheus.port }}
60 protocol: TCP
61 nodePort: {{ .Values.config.pcrf.prometheus.nodePort.port }}
62 {{- end }}
63 {{- if .Values.config.pcrf.gx.nodePort.enabled }}
64 - name: gx
65 port: 3868
66 protocol: TCP
67 nodePort: {{ .Values.config.pcrf.gx.nodePort.port }}
68 {{- end }}
69{{- end }}
70{{- end }}