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