2 # Copyright © 2017 Amdocs, Bell Canada
3 # Modifications Copyright © 2019 AT&T
4 # Copyright (c) 2021 J. F. Lucas. All rights reserved.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
20 dcaegen2-services-common.configMap:
21 This template produces Kubernetes configMap(s) needed by a
24 The template expects the full chart context as input. A chart for a
25 DCAE microservice references this template using:
26 {{ include "dcaegen2-services-common.configMap" . }}
27 The template directly references data in .Values, and indirectly (through its
28 use of templates from the ONAP "common" collection) references data in
31 The template always produces a configMap containing the microservice's
32 initial configuration data. This configMap is used by an initContainer
33 that loads the configuration into Consul. (See the documentation for
34 dcaegen2-services-common.microserviceDeployment for more details.)
36 If the microservice is using a logging sidecar (again, see the documentation
37 for dcaegen2-services-common.microserviceDeployment for more details), the
38 template generates an additiona configMap that supplies configuration
39 information for the logging sidecar.
42 {{- define "dcaegen2-services-common.configMap" -}}
43 {{- $appConf := .Values.applicationConfig | default (dict) -}}
47 name: {{ include "common.fullname" . }}-application-config-configmap
48 namespace: {{ include "common.namespace" . }}
49 labels: {{ include "common.labels" . | nindent 6 }}
51 application_config.yaml: |
52 {{ $appConf | toYaml | indent 4 }}
54 {{- if .Values.logDirectory }}
59 name: {{ include "common.fullname" . }}-filebeat-configmap
60 namespace: {{ include "common.namespace" . }}
61 labels: {{ include "common.labels" . | nindent 6 }}
64 {{ include "dcaegen2-services-common.filebeatConfiguration" . | indent 4 }}