Ajay Lotan Thakur | 6de3b78 | 2022-04-14 08:41:12 -0600 | [diff] [blame] | 1 | {{/* |
| 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 | --- |
| 23 | apiVersion: v1 |
| 24 | kind: ConfigMap |
| 25 | metadata: |
| 26 | name: sctplb |
| 27 | labels: |
| 28 | {{ tuple "sctplb" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 29 | data: |
| 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 }} |