Hi team, I'm running Fluent Bit via the Fluent Ope...
# fluent-operator
s
Hi team, I'm running Fluent Bit via the Fluent Operator and using a Lua filter to drop logs based on log level. Here's a snippet of my filter config:
Copy code
- lua:
    call: normalize_product_logs
    script:
      name: fluent-bit-modify-k8s-fields
      key: custom.lua
The
custom.lua
script uses environment variables like
drop_error_product
,
drop_debug_product
, etc., to control which logs should be dropped dynamically. For example:
Copy code
if log_level == "ERROR" and drop_error_product == "true" then
  return -1  -- drop log
end
These variables are passed via environment variables in the Fluent Bit container or set via config maps. Problem When I update the values of these variables (e.g., setting
drop_error_product
from
false
to
true
) and confirm that the
ConfigMap
is updated and pods are restarted manually, the updated logic does not take effect. However, the moment I: • remove the entire Lua block from the filter config and deploy • then add the same Lua block back and deploy again ...the changes start reflecting and logs get dropped correctly. Is Fluent Bit or the Lua plugin caching the script or its environment somewhere internally? Is there a supported or recommended way to force Fluent Bit to reload updated Lua script logic and/or environment config? Thanks a lot — any insights or best practices would be appreciated!