From ab77b9be53b5f9134185fa0554a9d668fc15eed2 Mon Sep 17 00:00:00 2001 From: Rez Date: Thu, 26 Jun 2025 16:48:44 +0300 Subject: [PATCH] fix: support object for httpUser and httpPassword in fluentbit ES output Signed-off-by: Rez --- .../fluentbit-output-elasticsearch.yaml | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/charts/fluent-operator/templates/fluentbit-output-elasticsearch.yaml b/charts/fluent-operator/templates/fluentbit-output-elasticsearch.yaml index de9172a9..399009ba 100644 --- a/charts/fluent-operator/templates/fluentbit-output-elasticsearch.yaml +++ b/charts/fluent-operator/templates/fluentbit-output-elasticsearch.yaml @@ -23,11 +23,23 @@ spec: {{- with .Values.fluentbit.output.es.index }} index: {{ . | quote }} {{- end }} - {{- with .Values.fluentbit.output.es.httpUser }} - httpUser: {{ . | quote }} + {{- $user := .Values.fluentbit.output.es.httpUser }} + {{- if $user }} + {{- if kindIs "map" $user }} + httpUser: + {{ toYaml $user | indent 6 }} + {{- else }} + httpUser: {{ $user | quote }} + {{- end }} + {{- end }} + {{- $pass := .Values.fluentbit.output.es.httpPassword }} + {{- if $pass }} + {{- if kindIs "map" $pass }} + httpPassword: + {{ toYaml $pass | indent 6 }} + {{- else }} + httpPassword: {{ $pass | quote }} {{- end }} - {{- with .Values.fluentbit.output.es.httpPassword }} - httpPassword: {{ . | quote }} {{- end }} logstashFormat: {{ .Values.fluentbit.output.es.logstashFormat | default true }} {{- with .Values.fluentbit.output.es.logstashPrefix }}