blob: b1435edd3cfeb2d67bfc69ca1013f9fa93a8826c [file] [log] [blame]
Badhrinath987e1d82020-11-20 13:23:58 -06001{{/*
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 }}
Hyunsun Moon6a651482021-02-26 01:46:44 -08008
Hyunsun Moonc73636b2021-03-24 15:47:08 -07009{{- if not .Values.config.useExistingConfigMap -}}
Hyunsun Moon6a651482021-02-26 01:46:44 -080010{{- $ausfcfg := index .Values.config.ausf.cfgFiles "ausfcfg.conf" }}
11{{- $sbi := index $ausfcfg.configuration "sbi" }}
12
13{{- if not (hasKey $sbi "registerIPv4") -}}
14{{- $_ := "POD_IP" | set $sbi "registerIPv4" -}}
15{{- end }}
16{{- if not (hasKey $sbi "bindingIPv4") -}}
17{{- $_ := "POD_IP" | set $sbi "bindingIPv4" -}}
18{{- end }}
19{{- if not (hasKey $sbi "port") -}}
20{{- $_ := .Values.config.ausf.sbi.port | set $sbi "port" -}}
21{{- end }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070022{{- end }}
Hyunsun Moon6a651482021-02-26 01:46:44 -080023
Badhrinath987e1d82020-11-20 13:23:58 -060024---
25apiVersion: v1
26kind: ConfigMap
27metadata:
28 name: ausf
29 labels:
30{{ tuple "ausf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
31data:
32 ausf-run.sh: |
33{{ tuple "bin/_ausf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070034{{- if not .Values.config.useExistingConfigMap -}}
Hyunsun Moon6a651482021-02-26 01:46:44 -080035{{- range $key, $value := .Values.config.ausf.cfgFiles }}
Badhrinath987e1d82020-11-20 13:23:58 -060036 {{ $key }}: |-
37{{ toYaml $value | indent 4 }}
38{{- end }}
39{{- end }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070040{{- end }}