blob: 72457ba7c0bbd09a378d2b7adc97f95dd96896db [file] [log] [blame]
Badhrinath987e1d82020-11-20 13:23:58 -06001{{/*
2# Copyright 2020-present Open Networking Foundation
3
4# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
5*/}}
6
7{{- if .Values.config.webui.deploy }}
8---
9apiVersion: v1
10kind: Service
11metadata:
12 name: webui
13 labels:
14{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }}
15spec:
16 type: ClusterIP
17 selector:
18{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }}
19 ports:
20 - name: prometheus-exporter
21 port: {{ .Values.config.webui.prometheus.port }}
22 protocol: TCP
23
24---
25apiVersion: v1
26kind: Service
27metadata:
28 name: webui-headless
29 labels:
30{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }}
31spec:
32 clusterIP: None
33 selector:
34{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }}
35{{- if or .Values.config.webui.prometheus.nodePort.enabled }}
36---
37apiVersion: v1
38kind: Service
39metadata:
40 name: webui-external
41 labels:
42{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }}
43spec:
44 type: NodePort
45 selector:
46{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }}
47 ports:
48{{- if .Values.config.webui.prometheus.nodePort.enabled }}
49 - name: prometheus-exporter
50 port: {{ .Values.config.webui.prometheus.port }}
51 protocol: TCP
52 nodePort: {{ .Values.config.webui.prometheus.nodePort.port }}
53{{- end }}
54{{- if .Values.config.webui.urlport.nodePort.enabled }}
55 - name: urlport-http
56 port: {{ .Values.config.webui.urlport.port }}
57 protocol: TCP
58 nodePort: {{ .Values.config.webui.urlport.nodePort.port }}
59{{- end }}
60{{- end }}
61{{- end }}