blob: 5caf46039f74e7cba95ea9eb9bac4bb5a554ab1d [file] [log] [blame]
Ajay Lotan Thakur9ad7dfe2022-07-25 17:26:03 -06001{{/*
2
3# SPDX-FileCopyrightText: 2022-present Intel Corporation
4
5# SPDX-License-Identifier: Apache-2.0
6*/}}
7
8{{- if .Values.config.upfadapter.deploy }}
9
10{{- if not .Values.config.useExistingConfigMap -}}
11{{- $upfadaptercfg := index .Values.config.upfadapter.cfgFiles "config.yaml" }}
12
13{{- if not (hasKey $upfadaptercfg "mongodb") -}}
14{{- $_ := dict "name" .Values.config.mongodb.name "url" .Values.config.mongodb.url | set $upfadaptercfg "mongodb" -}}
15{{- end }}
16
17{{- end }}
18
19---
20apiVersion: v1
21kind: ConfigMap
22metadata:
23 name: upf-adapter
24 labels:
25{{ tuple "upfadapter" . | include "5g-control-plane.metadata_labels" | indent 4 }}
26data:
27 upf-adapter-run.sh: |
28{{ tuple "bin/_upf-adapter-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
29{{- if not .Values.config.useExistingConfigMap -}}
30{{- range $key, $value := .Values.config.upfadapter.cfgFiles }}
31 {{ $key }}: |-
32{{ toYaml $value | indent 4 }}
33{{- end }}
34{{- end }}
35{{- end }}