blob: 79e0a2831b57cc569a100cbb42d461380b5656dc [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:
Hyunsun Moon07a193c2022-03-25 16:21:04 -060016 type: {{ .Values.config.pcrf.serviceType }}
17{{- if .Values.config.pcrf.externalIP }}
18 externalIPs:
19 - {{ .Values.config.pcrf.externalIP }}
20{{- end }}
21{{- if eq .Values.config.pcrf.serviceType "LoadBalancer" }}
22{{- if .Values.config.pcrf.loadBalancerIP }}
23 loadBalancerIP: {{ .Values.config.pcrf.loadBalancerIP }}
24{{- end }}
25{{- end }}
badhri854c028b32021-11-03 18:24:05 -050026 selector:
27{{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
28 ports:
29 - name: gx
30 port: 3868
31 protocol: TCP
Hyunsun Moon07a193c2022-03-25 16:21:04 -060032{{- if eq .Values.config.pcrf.serviceType "NodePort" }}
33{{- if .Values.config.pcrf.gx.nodePort }}
34 nodePort: {{ .Values.config.pcrf.gx.nodePort }}
35{{- end }}
36{{- end }}
badhri854c028b32021-11-03 18:24:05 -050037 - name: prometheus-exporter
38 port: {{ .Values.config.pcrf.prometheus.port }}
39 protocol: TCP
Hyunsun Moon07a193c2022-03-25 16:21:04 -060040{{- if eq .Values.config.pcrf.serviceType "NodePort" }}
41{{- if .Values.config.pcrf.prometheus.nodePort }}
42 nodePort: {{ .Values.config.pcrf.prometheus.nodePort }}
43{{- end }}
44{{- end }}
badhri854c028b32021-11-03 18:24:05 -050045 - name: config-port
46 port: {{ .Values.config.pcrf.configPort.port }}
47 protocol: TCP
Hyunsun Moon07a193c2022-03-25 16:21:04 -060048{{- if eq .Values.config.pcrf.serviceType "NodePort" }}
49{{- if .Values.config.pcrf.configPort.nodePort }}
50 nodePort: {{ .Values.config.pcrf.configPort.nodePort }}
51{{- end }}
badhri854c028b32021-11-03 18:24:05 -050052{{- end }}
53{{- end }}