blob: 9d5147cbb2f394b17ca9bd0c23cda5e96d29e7b1 [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.pcf.deploy }}
Hyunsun Moon6a651482021-02-26 01:46:44 -08008
9{{- $pcfcfg := index .Values.config.pcf.cfgFiles "pcfcfg.conf" }}
10{{- $sbi := index $pcfcfg.configuration "sbi" }}
11
12{{- if not (hasKey $sbi "registerIPv4") -}}
13{{- $_ := "POD_IP" | set $sbi "registerIPv4" -}}
14{{- end }}
15{{- if not (hasKey $sbi "bindingIPv4") -}}
16{{- $_ := "POD_IP" | set $sbi "bindingIPv4" -}}
17{{- end }}
18{{- if not (hasKey $sbi "port") -}}
19{{- $_ := .Values.config.pcf.sbi.port | set $sbi "port" -}}
20{{- end }}
21
Badhrinath987e1d82020-11-20 13:23:58 -060022---
23apiVersion: v1
24kind: ConfigMap
25metadata:
26 name: pcf
27 labels:
28{{ tuple "pcf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
29data:
30 pcf-run.sh: |
31{{ tuple "bin/_pcf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
Hyunsun Moon6a651482021-02-26 01:46:44 -080032{{- range $key, $value := .Values.config.pcf.cfgFiles }}
Badhrinath987e1d82020-11-20 13:23:58 -060033 {{ $key }}: |-
34{{ toYaml $value | indent 4 }}
35{{- end }}
36{{- end }}