blob: e17957da30a73db332282111904422196552738c [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
Hyunsun Moonc73636b2021-03-24 15:47:08 -07009{{- if not .Values.config.useExistingConfigMap -}}
Hyunsun Moon6a651482021-02-26 01:46:44 -080010{{- $udrcfg := index .Values.config.udr.cfgFiles "udrcfg.conf" }}
11{{- $config := index $udrcfg "configuration" }}
12{{- $sbi := index $config "sbi" }}
13
14{{- if not (hasKey $config "mongodb") -}}
15{{- $_ := dict "name" .Values.config.mongodb.name "url" .Values.config.mongodb.url | set $config "mongodb" -}}
16{{- end }}
17
Hyunsun Moon6a651482021-02-26 01:46:44 -080018{{- if not (hasKey $sbi "port") -}}
19{{- $_ := .Values.config.udr.sbi.port | set $sbi "port" -}}
20{{- end }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070021{{- end }}
Hyunsun Moon6a651482021-02-26 01:46:44 -080022
Badhrinath987e1d82020-11-20 13:23:58 -060023---
24apiVersion: v1
25kind: ConfigMap
26metadata:
27 name: udr
28 labels:
29{{ tuple "udr" . | include "5g-control-plane.metadata_labels" | indent 4 }}
30data:
31 udr-run.sh: |
32{{ tuple "bin/_udr-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070033{{- if not .Values.config.useExistingConfigMap -}}
Hyunsun Moon6a651482021-02-26 01:46:44 -080034{{- range $key, $value := .Values.config.udr.cfgFiles }}
Badhrinath987e1d82020-11-20 13:23:58 -060035 {{ $key }}: |-
36{{ toYaml $value | indent 4 }}
37{{- end }}
38{{- end }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070039{{- end }}