blob: 142b9ff0f071e4feb1c356d45cc9b7c8543b42ad [file] [log] [blame]
{{/*
# Copyright 2020-present Open Networking Foundation
# SPDX-License-Identifier: Apache-2.0
*/}}
{{- if .Values.config.webui.deploy }}
{{ tuple "webui" . | include "5g-control-plane.service_account" }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: webui
labels:
{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }}
spec:
replicas: 1
selector:
matchLabels:
{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 6 }}
template:
metadata:
labels:
{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 8 }}
{{- with .Values.config.webui.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
serviceAccountName: webui
{{- if hasKey .Values.images "pullSecrets" }}
imagePullSecrets:
{{ toYaml .Values.images.pullSecrets | indent 8 }}
{{- end }}
{{- if .Values.config.coreDump.enabled }}
initContainers:
{{ tuple "webui" . | include "5g-control-plane.coredump_init" | indent 6 }}
{{- end }}
containers:
- name: webui
image: {{ .Values.images.repository }}{{ .Values.images.tags.webui }}
env:
- name: GRPC_GO_LOG_VERBOSITY_LEVEL
value: {{ .Values.config.grpc.golog_verbosity | quote }}
- name: GRPC_GO_LOG_SEVERITY_LEVEL
value: {{ .Values.config.grpc.severity | quote }}
- name: GRPC_TRACE
value: {{ .Values.config.grpc.trace | quote }}
- name: GRPC_VERBOSITY
value: {{ .Values.config.grpc.verbosity | quote }}
- name: CONFIGPOD_DEPLOYMENT
value: "5G"
imagePullPolicy: {{ .Values.images.pullPolicy }}
{{- if .Values.config.coreDump.enabled }}
securityContext:
runAsUser: 0
{{- end }}
stdin: true
tty: true
command: ["/free5gc/script/webui-run.sh"]
{{- if .Values.resources.enabled }}
resources:
{{ toYaml .Values.resources.webui | indent 10 }}
{{- end }}
volumeMounts:
- name: run-script
mountPath: /free5gc/script/webui-run.sh
subPath: webui-run.sh
- name: nf-config
mountPath: /free5gc/config
{{- if .Values.config.coreDump.enabled }}
- name: coredump
mountPath: /tmp/coredump
{{- end }}
volumes:
- name: run-script
configMap:
name: webui
defaultMode: 493
- name: nf-config
configMap:
name: webui
defaultMode: 493
{{- if .Values.config.coreDump.enabled }}
- name: host-rootfs
hostPath:
path: /
- name: coredump
hostPath:
path: {{ .Values.config.coreDump.path }}
{{- end }}
{{- end }}