aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes
diff options
context:
space:
mode:
authorMaciej Wereski <m.wereski@partner.samsung.com>2021-10-04 15:44:38 +0200
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2021-10-29 14:11:53 +0000
commit77ecf276763ba23eddcd05bedefed3b6da3bd7ea (patch)
treec23e2632e8a1d30338ec7519282a89e9a1b94cc0 /kubernetes
parent2c2be1eea53e97cc1972c0b89571baff92e59484 (diff)
[COMMON] Log: add ability to set ConfigMap name in volumes
In case where subchart uses ConfigMap that was defined in parent chart, wrong chart name will be generated. This change allows to workaround that issue by supplying own prefix instead of generated one. Issue-ID: OOM-1 Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com> Change-Id: Ieed19d46e4205cd5b23b4c74af19c618a6e48466
Diffstat (limited to 'kubernetes')
-rw-r--r--kubernetes/common/common/templates/_log.tpl6
1 files changed, 4 insertions, 2 deletions
diff --git a/kubernetes/common/common/templates/_log.tpl b/kubernetes/common/common/templates/_log.tpl
index dc714aecc4..81420468b0 100644
--- a/kubernetes/common/common/templates/_log.tpl
+++ b/kubernetes/common/common/templates/_log.tpl
@@ -31,10 +31,12 @@
{{- end -}}
{{- define "common.log.volumes" -}}
-{{- if .Values.global.centralizedLoggingEnabled }}
+{{- $dot := default . .dot }}
+{{- if $dot.Values.global.centralizedLoggingEnabled }}
+{{- $configMapName := printf "%s-filebeat" (default (include "common.fullname" $dot) .configMapNamePrefix) }}
- name: filebeat-conf
configMap:
- name: {{ include "common.fullname" . }}-filebeat
+ name: {{ $configMapName }}
- name: filebeat-data
emptyDir: {}
{{- end -}}