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 |
| 23 | |
| 24 | --- |
| 25 | apiVersion: v1 |
| 26 | kind: Service |
| 27 | metadata: |
| 28 | name: webui-headless |
| 29 | labels: |
| 30 | {{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 31 | spec: |
| 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 | --- |
| 37 | apiVersion: v1 |
| 38 | kind: Service |
| 39 | metadata: |
| 40 | name: webui-external |
| 41 | labels: |
| 42 | {{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 43 | spec: |
| 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 }} |