blob: be96dfa7f0cdf9d3f8e2a2898151e1136f498678 [file] [log] [blame]
Ajay Lotan Thakur6de3b782022-04-14 08:41:12 -06001{{/*
2# Copyright 2020-present Open Networking Foundation
3
4# SPDX-License-Identifier: Apache-2.0
5*/}}
6
7{{- if .Values.config.sctplb.deploy }}
8
9{{- if not .Values.config.useExistingConfigMap -}}
10{{- $sctplbcfg := index .Values.config.sctplb.cfgFiles "sctplb.yaml" }}
11
12{{- if not (hasKey $sctplbcfg.configuration "ngappPort") -}}
13{{- $_ := .Values.config.sctplb.ngapp.port | set $sctplbcfg.configuration "ngappPort" -}}
14{{- end }}
15
16{{- if not (hasKey $sctplbcfg.configuration "sctpGrpcPort") -}}
17{{- $_ := .Values.config.sctplb.sctp_grpc.port | set $sctplbcfg.configuration "sctpGrpcPort" -}}
18{{- end }}
19
20{{- end }}
21
22---
23apiVersion: v1
24kind: ConfigMap
25metadata:
26 name: sctplb
27 labels:
28{{ tuple "sctplb" . | include "5g-control-plane.metadata_labels" | indent 4 }}
29data:
30 sctplb-run.sh: |
31{{ tuple "bin/_sctplb-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
32{{- if not .Values.config.useExistingConfigMap -}}
33{{- range $key, $value := .Values.config.sctplb.cfgFiles }}
34 {{ $key }}: |-
35{{ toYaml $value | indent 4 }}
36{{- end }}
37{{- end }}
38{{- end }}