Ajay Lotan Thakur | a2e2adb | 2022-06-06 13:46:30 -0600 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright 2022-present Open Networking Foundation |
| 3 | |
| 4 | # SPDX-License-Identifier: Apache-2.0 |
| 5 | */}} |
| 6 | |
| 7 | {{- if .Values.config.metricfunc.deploy }} |
| 8 | |
| 9 | {{- if not .Values.config.useExistingConfigMap -}} |
| 10 | {{- $metricscfg := index .Values.config.metricfunc.cfgFiles "metricscfg.conf" }} |
| 11 | |
| 12 | {{- end }} |
| 13 | |
| 14 | --- |
| 15 | apiVersion: v1 |
| 16 | kind: ConfigMap |
| 17 | metadata: |
| 18 | name: metricfunc |
| 19 | labels: |
| 20 | {{ tuple "metricfunc" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 21 | data: |
| 22 | metricfunc-run.sh: | |
| 23 | {{ tuple "bin/_metricfunc-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }} |
| 24 | {{- if not .Values.config.useExistingConfigMap -}} |
| 25 | {{- range $key, $value := .Values.config.metricfunc.cfgFiles }} |
| 26 | {{ $key }}: |- |
| 27 | {{ toYaml $value | indent 4 }} |
| 28 | {{- end }} |
| 29 | {{- end }} |
| 30 | {{- end }} |