blob: 3508ac396b16ef8b9955f09056f030041f4a456e [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.udr.deploy }}
Hyunsun Moon6a651482021-02-26 01:46:44 -08008
9{{- $udrcfg := index .Values.config.udr.cfgFiles "udrcfg.conf" }}
10{{- $config := index $udrcfg "configuration" }}
11{{- $sbi := index $config "sbi" }}
12
13{{- if not (hasKey $config "mongodb") -}}
14{{- $_ := dict "name" .Values.config.mongodb.name "url" .Values.config.mongodb.url | set $config "mongodb" -}}
15{{- end }}
16
17{{- if not (hasKey $sbi "registerIPv4") -}}
18{{- $_ := "POD_IP" | set $sbi "registerIPv4" -}}
19{{- end }}
20{{- if not (hasKey $sbi "bindingIPv4") -}}
21{{- $_ := "POD_IP" | set $sbi "bindingIPv4" -}}
22{{- end }}
23{{- if not (hasKey $sbi "port") -}}
24{{- $_ := .Values.config.udr.sbi.port | set $sbi "port" -}}
25{{- end }}
26
Badhrinath987e1d82020-11-20 13:23:58 -060027---
28apiVersion: v1
29kind: ConfigMap
30metadata:
31 name: udr
32 labels:
33{{ tuple "udr" . | include "5g-control-plane.metadata_labels" | indent 4 }}
34data:
35 udr-run.sh: |
36{{ tuple "bin/_udr-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
Hyunsun Moon6a651482021-02-26 01:46:44 -080037{{- range $key, $value := .Values.config.udr.cfgFiles }}
Badhrinath987e1d82020-11-20 13:23:58 -060038 {{ $key }}: |-
39{{ toYaml $value | indent 4 }}
40{{- end }}
41{{- end }}