blob: 9ef05af04fd8877aa8a273f4d41a7b717b7c6dfa [file] [log] [blame]
{{/*
# Copyright 2020-present Open Networking Foundation
# SPDX-License-Identifier: Apache-2.0
*/}}
{{- if .Values.config.webui.deploy }}
---
apiVersion: v1
kind: Service
metadata:
name: webui
labels:
{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }}
{{- with .Values.config.webui.serviceAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.config.webui.serviceType }}
selector:
{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }}
ports:
- name: urlport-http
port: {{ .Values.config.webui.urlport.port }}
protocol: TCP
{{- if eq .Values.config.webui.serviceType "NodePort" }}
{{- if .Values.config.webui.urlport.nodePort }}
nodePort: {{ .Values.config.webui.urlport.nodePort }}
{{- end }}
{{- end }}
- name: grpc
port: {{ .Values.config.webui.grpc.port }}
protocol: TCP
{{- if eq .Values.config.webui.serviceType "NodePort" }}
{{- if .Values.config.webui.grpc.nodePort }}
nodePort: {{ .Values.config.webui.grpc.nodePort }}
{{- end }}
{{- end }}
{{- end }}