blob: 2c9b89729d2d1ad37fc5705505efcdd1c2bd17f7 [file] [log] [blame]
{{/*
# Copyright 2020-present Open Networking Foundation
# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
*/}}
{{- if .Values.config.pcrf.deploy }}
---
apiVersion: v1
kind: Service
metadata:
name: pcrf
labels:
{{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
spec:
selector:
{{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
ports:
- name: gx
port: 3868
protocol: TCP
- name: prometheus-exporter
port: {{ .Values.config.pcrf.prometheus.port }}
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: pcrf-headless
labels:
{{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
spec:
selector:
{{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
clusterIP: None
ports:
- name: gx
port: 3868
protocol: TCP
- name: prometheus-exporter
port: {{ .Values.config.pcrf.prometheus.port }}
protocol: TCP
---
{{- if or (.Values.config.pcrf.prometheus.nodePort.enabled) (.Values.config.pcrf.gx.nodePort.enabled) }}
apiVersion: v1
kind: Service
metadata:
name: pcrf-external
labels:
{{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
spec:
selector:
{{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
type: NodePort
ports:
{{- if .Values.config.pcrf.prometheus.nodePort.enabled }}
- name: prometheus-exporter
port: {{ .Values.config.pcrf.prometheus.port }}
protocol: TCP
nodePort: {{ .Values.config.pcrf.prometheus.nodePort.port }}
{{- end }}
{{- if .Values.config.pcrf.gx.nodePort.enabled }}
- name: gx
port: 3868
protocol: TCP
nodePort: {{ .Values.config.pcrf.gx.nodePort.port }}
{{- end }}
{{- end }}
{{- end }}