badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [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.ausf.deploy }} |
| 8 | |
| 9 | {{- if not .Values.config.useExistingConfigMap -}} |
| 10 | {{- $ausfcfg := index .Values.config.ausf.cfgFiles "ausfcfg.conf" }} |
| 11 | {{- $sbi := index $ausfcfg.configuration "sbi" }} |
| 12 | |
| 13 | {{- if not (hasKey $ausfcfg "logger") -}} |
| 14 | {{- $_ := .Values.config.logger | set $ausfcfg "logger" -}} |
| 15 | {{- end }} |
| 16 | |
| 17 | |
| 18 | {{- if not (hasKey $sbi "port") -}} |
| 19 | {{- $_ := .Values.config.ausf.sbi.port | set $sbi "port" -}} |
| 20 | {{- end }} |
| 21 | {{- end }} |
| 22 | |
| 23 | --- |
| 24 | apiVersion: v1 |
| 25 | kind: ConfigMap |
| 26 | metadata: |
| 27 | name: ausf |
| 28 | labels: |
| 29 | {{ tuple "ausf" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 30 | data: |
| 31 | ausf-run.sh: | |
| 32 | {{ tuple "bin/_ausf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }} |
| 33 | {{- if not .Values.config.useExistingConfigMap -}} |
| 34 | {{- range $key, $value := .Values.config.ausf.cfgFiles }} |
| 35 | {{ $key }}: |- |
| 36 | {{ toYaml $value | indent 4 }} |
| 37 | {{- end }} |
| 38 | {{- end }} |
| 39 | {{- end }} |