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