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.amf.deploy }} |
Hyunsun Moon | 6a65148 | 2021-02-26 01:46:44 -0800 | [diff] [blame] | 8 | |
Hyunsun Moon | c73636b | 2021-03-24 15:47:08 -0700 | [diff] [blame] | 9 | {{- if not .Values.config.useExistingConfigMap -}} |
Hyunsun Moon | 6a65148 | 2021-02-26 01:46:44 -0800 | [diff] [blame] | 10 | {{- $amfcfg := index .Values.config.amf.cfgFiles "amfcfg.conf" }} |
| 11 | {{- $sbi := index $amfcfg.configuration "sbi" }} |
| 12 | |
Hyunsun Moon | 6a65148 | 2021-02-26 01:46:44 -0800 | [diff] [blame] | 13 | {{- if not (hasKey $sbi "port") -}} |
| 14 | {{- $_ := .Values.config.amf.sbi.port | set $sbi "port" -}} |
| 15 | {{- end }} |
| 16 | |
Ajay Lotan Thakur | ef182f4 | 2021-05-25 16:41:19 -0500 | [diff] [blame] | 17 | {{- if not (hasKey $amfcfg "logger") -}} |
| 18 | {{- $_ := .Values.config.logger | set $amfcfg "logger" -}} |
| 19 | {{- end }} |
| 20 | |
Hyunsun Moon | 6a65148 | 2021-02-26 01:46:44 -0800 | [diff] [blame] | 21 | {{- end }} |
root | d623d5b | 2021-03-11 09:06:34 -0700 | [diff] [blame] | 22 | |
Hyunsun Moon | 6a65148 | 2021-02-26 01:46:44 -0800 | [diff] [blame] | 23 | |
Badhrinath | 987e1d8 | 2020-11-20 13:23:58 -0600 | [diff] [blame] | 24 | --- |
| 25 | apiVersion: v1 |
| 26 | kind: ConfigMap |
| 27 | metadata: |
| 28 | name: amf |
| 29 | labels: |
| 30 | {{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 31 | data: |
| 32 | amf-run.sh: | |
| 33 | {{ tuple "bin/_amf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }} |
Hyunsun Moon | c73636b | 2021-03-24 15:47:08 -0700 | [diff] [blame] | 34 | {{- if not .Values.config.useExistingConfigMap -}} |
Hyunsun Moon | 6a65148 | 2021-02-26 01:46:44 -0800 | [diff] [blame] | 35 | {{- range $key, $value := .Values.config.amf.cfgFiles }} |
Badhrinath | 987e1d8 | 2020-11-20 13:23:58 -0600 | [diff] [blame] | 36 | {{ $key }}: |- |
| 37 | {{ toYaml $value | indent 4 }} |
| 38 | {{- end }} |
| 39 | {{- end }} |
Hyunsun Moon | c73636b | 2021-03-24 15:47:08 -0700 | [diff] [blame] | 40 | {{- end }} |