Badhrinath | 987e1d8 | 2020-11-20 13:23:58 -0600 | [diff] [blame] | 1 | {{/* |
| 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 | --- |
| 9 | apiVersion: v1 |
| 10 | kind: Service |
| 11 | metadata: |
| 12 | name: webui |
| 13 | labels: |
| 14 | {{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 15 | spec: |
| 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 Moon | 6a65148 | 2021-02-26 01:46:44 -0800 | [diff] [blame] | 23 | - name: urlport-http |
| 24 | port: {{ .Values.config.webui.urlport.port }} |
| 25 | protocol: TCP |
| 26 | {{- if or .Values.config.webui.urlport.nodePort.enabled .Values.config.webui.prometheus.nodePort.enabled }} |
Badhrinath | 987e1d8 | 2020-11-20 13:23:58 -0600 | [diff] [blame] | 27 | --- |
| 28 | apiVersion: v1 |
| 29 | kind: Service |
| 30 | metadata: |
| 31 | name: webui-external |
| 32 | labels: |
| 33 | {{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 34 | spec: |
| 35 | type: NodePort |
| 36 | selector: |
| 37 | {{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 38 | ports: |
| 39 | {{- if .Values.config.webui.prometheus.nodePort.enabled }} |
| 40 | - name: prometheus-exporter |
| 41 | port: {{ .Values.config.webui.prometheus.port }} |
| 42 | protocol: TCP |
| 43 | nodePort: {{ .Values.config.webui.prometheus.nodePort.port }} |
| 44 | {{- end }} |
| 45 | {{- if .Values.config.webui.urlport.nodePort.enabled }} |
| 46 | - name: urlport-http |
| 47 | port: {{ .Values.config.webui.urlport.port }} |
| 48 | protocol: TCP |
| 49 | nodePort: {{ .Values.config.webui.urlport.nodePort.port }} |
| 50 | {{- end }} |
| 51 | {{- end }} |
| 52 | {{- end }} |