blob: d423cd9e395d3eed857c8aadbdfbb697708b700c [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
40---
41{{- if or (.Values.config.pcrf.prometheus.nodePort.enabled) (.Values.config.pcrf.gx.nodePort.enabled) }}
42apiVersion: v1
43kind: Service
44metadata:
45 name: pcrf-external
46 labels:
47{{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
48spec:
49 selector:
50{{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
51 type: NodePort
52 ports:
53 {{- if .Values.config.pcrf.prometheus.nodePort.enabled }}
54 - name: prometheus-exporter
55 port: {{ .Values.config.pcrf.prometheus.port }}
56 protocol: TCP
57 nodePort: {{ .Values.config.pcrf.prometheus.nodePort.port }}
58 {{- end }}
59 {{- if .Values.config.pcrf.gx.nodePort.enabled }}
60 - name: gx
61 port: 3868
62 protocol: TCP
63 nodePort: {{ .Values.config.pcrf.gx.nodePort.port }}
64 {{- end }}
65{{- end }}
66{{- end }}