blob: 116f930af527a2a4a8d1e90e85d65c5292d7f150 [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
Ajay Lotan Thakurdad35d32021-03-18 12:21:21 -050025 - name: config-port
26 port: {{ .Values.config.pcrf.configPort.port }}
27 protocol: TCP
Ajay Lotan Thakurc3cd6192020-10-12 20:12:38 -050028---
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
Ajay Lotan Thakurcd372a22020-12-11 14:36:26 -070043 - name: prometheus-exporter
44 port: {{ .Values.config.pcrf.prometheus.port }}
45 protocol: TCP
Ajay Lotan Thakurdad35d32021-03-18 12:21:21 -050046 - name: config-port
47 port: {{ .Values.config.pcrf.configPort.port }}
48 protocol: TCP
Ajay Lotan Thakurc3cd6192020-10-12 20:12:38 -050049{{- if or (.Values.config.pcrf.prometheus.nodePort.enabled) (.Values.config.pcrf.gx.nodePort.enabled) }}
Ajay Lotan Thakurdad35d32021-03-18 12:21:21 -050050---
Ajay Lotan Thakurc3cd6192020-10-12 20:12:38 -050051apiVersion: 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 }}
Ajay Lotan Thakurdad35d32021-03-18 12:21:21 -050074 {{- 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 }}
Ajay Lotan Thakurc3cd6192020-10-12 20:12:38 -050080{{- end }}
81{{- end }}