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