blob: 0afc3dc897025a3b34b3348ae3d4b409bde083bd [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
Hyunsun Moon6a651482021-02-26 01:46:44 -080023 - name: urlport-http
24 port: {{ .Values.config.webui.urlport.port }}
25 protocol: TCP
badhrinath.pa@gmail.comb918a802021-06-16 20:24:17 -050026 - name: grpc
27 port: {{ .Values.config.webui.grpc.port }}
28 protocol: TCP
Hyunsun Moon6a651482021-02-26 01:46:44 -080029{{- if or .Values.config.webui.urlport.nodePort.enabled .Values.config.webui.prometheus.nodePort.enabled }}
Badhrinath987e1d82020-11-20 13:23:58 -060030---
31apiVersion: v1
32kind: Service
33metadata:
34 name: webui-external
35 labels:
36{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }}
37spec:
38 type: NodePort
39 selector:
40{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }}
41 ports:
42{{- if .Values.config.webui.prometheus.nodePort.enabled }}
43 - name: prometheus-exporter
44 port: {{ .Values.config.webui.prometheus.port }}
45 protocol: TCP
46 nodePort: {{ .Values.config.webui.prometheus.nodePort.port }}
47{{- end }}
48{{- if .Values.config.webui.urlport.nodePort.enabled }}
49 - name: urlport-http
50 port: {{ .Values.config.webui.urlport.port }}
51 protocol: TCP
52 nodePort: {{ .Values.config.webui.urlport.nodePort.port }}
53{{- end }}
54{{- end }}
55{{- end }}