blob: 75e07550026497292a98f80956b3f64157be9f36 [file] [log] [blame]
badhri854c028b32021-11-03 18:24:05 -05001{{/*
2# Copyright 2020-present Open Networking Foundation
3
Ajay Lotan Thakur03189d22022-02-10 14:06:03 -06004# SPDX-License-Identifier: Apache-2.0
badhri854c028b32021-11-03 18:24:05 -05005*/}}
6
7{{- if .Values.config.gnbsim.deploy }}
Ajay Lotan Thakur0203c3b2022-03-21 13:40:11 -06008{{- if not .Values.config.useExistingConfigMap }}
9{{- $config := index .Values.config "gnbsim" }}
10{{- $gnbconf := index .Values.config.gnbsim.yamlCfgFiles "gnb.conf" }}
11{{- $configuration := index $gnbconf "configuration" }}
12
Ajay Lotan Thakureadf7702022-09-30 00:02:58 -060013{{- if not (hasKey $configuration "goProfile") -}}
14{{- $_ := dict "enable" .Values.config.gnbsim.goProfile.enable "port" .Values.config.gnbsim.goProfile.port | set $configuration "goProfile" -}}
15{{- end }}
16
Ajay Lotan Thakur82c4bec2022-09-02 13:51:45 -060017{{- if not (hasKey $configuration "httpServer") -}}
18{{- $_ := dict "enable" .Values.config.gnbsim.httpServer.enable "ipAddr" .Values.config.gnbsim.httpServer.ipAddr "port" .Values.config.gnbsim.httpServer.port | set $configuration "httpServer" -}}
19{{- end }}
20
Ajay Lotan Thakur0203c3b2022-03-21 13:40:11 -060021{{- if not (hasKey $configuration "singleInterface") -}}
22{{- $_ := .Values.config.gnbsim.singleInterface | set $configuration "singleInterface" -}}
23{{- end }}
24{{- $_ := .Values.config.gnbsim.networkTopo | set $configuration "networkTopo" -}}
25{{- end }}
26
27
badhri854c028b32021-11-03 18:24:05 -050028---
29apiVersion: v1
30kind: ConfigMap
31metadata:
32 name: gnbsim
33 labels:
34{{ tuple "gnbsim" . | include "5g-ransim-plane.metadata_labels" | indent 4 }}
35data:
36 gnbsim-run.sh: |
37{{ tuple "bin/_gnbsim-run.sh.tpl" . | include "5g-ransim-plane.template" | indent 4 }}
38{{- range $key, $value := .Values.config.gnbsim.yamlCfgFiles }}
Ajay Lotan Thakur11e2d152022-02-28 15:33:43 -060039 {{ $key }}: |-
40{{ toYaml $value | indent 4 }}
badhri854c028b32021-11-03 18:24:05 -050041{{- end }}
42{{- end }}