badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright 2020-present Open Networking Foundation |
| 3 | |
Ajay Lotan Thakur | 03189d2 | 2022-02-10 14:06:03 -0600 | [diff] [blame] | 4 | # SPDX-License-Identifier: Apache-2.0 |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 5 | */}} |
| 6 | |
| 7 | {{- if .Values.config.gnbsim.deploy }} |
Ajay Lotan Thakur | 0203c3b | 2022-03-21 13:40:11 -0600 | [diff] [blame] | 8 | {{- 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 Thakur | 82c4bec | 2022-09-02 13:51:45 -0600 | [diff] [blame^] | 13 | {{- if not (hasKey $configuration "httpServer") -}} |
| 14 | {{- $_ := dict "enable" .Values.config.gnbsim.httpServer.enable "ipAddr" .Values.config.gnbsim.httpServer.ipAddr "port" .Values.config.gnbsim.httpServer.port | set $configuration "httpServer" -}} |
| 15 | {{- end }} |
| 16 | |
Ajay Lotan Thakur | 0203c3b | 2022-03-21 13:40:11 -0600 | [diff] [blame] | 17 | {{- if not (hasKey $configuration "singleInterface") -}} |
| 18 | {{- $_ := .Values.config.gnbsim.singleInterface | set $configuration "singleInterface" -}} |
| 19 | {{- end }} |
| 20 | {{- $_ := .Values.config.gnbsim.networkTopo | set $configuration "networkTopo" -}} |
| 21 | {{- end }} |
| 22 | |
| 23 | |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 24 | --- |
| 25 | apiVersion: v1 |
| 26 | kind: ConfigMap |
| 27 | metadata: |
| 28 | name: gnbsim |
| 29 | labels: |
| 30 | {{ tuple "gnbsim" . | include "5g-ransim-plane.metadata_labels" | indent 4 }} |
| 31 | data: |
| 32 | gnbsim-run.sh: | |
| 33 | {{ tuple "bin/_gnbsim-run.sh.tpl" . | include "5g-ransim-plane.template" | indent 4 }} |
| 34 | {{- range $key, $value := .Values.config.gnbsim.yamlCfgFiles }} |
Ajay Lotan Thakur | 11e2d15 | 2022-02-28 15:33:43 -0600 | [diff] [blame] | 35 | {{ $key }}: |- |
| 36 | {{ toYaml $value | indent 4 }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 37 | {{- end }} |
| 38 | {{- end }} |