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