From 77ecf276763ba23eddcd05bedefed3b6da3bd7ea Mon Sep 17 00:00:00 2001 From: Maciej Wereski Date: Mon, 4 Oct 2021 15:44:38 +0200 Subject: [PATCH] [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 Change-Id: Ieed19d46e4205cd5b23b4c74af19c618a6e48466 --- kubernetes/common/common/templates/_log.tpl | 6 ++++-- 1 file 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 -}} -- 2.16.6