fluent / helm-charts

Helm Charts for Fluentd and Fluent Bit
Apache License 2.0
375 stars 448 forks source link

[fluent-bit] Enabling hotReload creates an empty luascripts configmap #472

Open rgaduput opened 6 months ago

rgaduput commented 6 months ago

We have requirement where we create the ConfigMap of lua scripts outside the fluent-bit charts. The reason is that configmap-luascripts.yaml file in the chart does not support rendering. After creating custom configMap with the required lua scripts, i have tried to enable hotReload. But because of the way chart is designed https://github.com/fluent/helm-charts/blob/main/charts/fluent-bit/templates/_pod.tpl#L94 https://github.com/fluent/helm-charts/blob/main/charts/fluent-bit/templates/configmap-luascripts.yaml#L1 when ever hotReload is enabled it tries to create a lua scripts configMap does not matter what we have at .Values.luaScripts and it overwrites my custom config mountpoint inside the pod (/fluent-bit/scripts) which causes fluent-bit to fail since the script does not exists any more at path /fluent-bit/scripts/<script.lua>.

My suggestion is to support hotReload without mixing with the lua script config.

Thanks