Skip to content

Commit

Permalink
Merge pull request #1299 from dex4er/bugfix/lua-code
Browse files Browse the repository at this point in the history
Render ConfigMap only if key is not empty string
  • Loading branch information
benjaminhuo authored Aug 14, 2024
2 parents 3d77840 + 785d898 commit b117639
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apis/fluentbit/v1alpha2/clusterfluentbitconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ func (cfg ClusterFluentBitConfig) RenderLuaScript(
scripts := make([]Script, 0)
for _, f := range filters.Items {
for _, p := range f.Spec.FilterItems {
if p.Lua != nil {
if p.Lua != nil && p.Lua.Script.Key != "" {
script, err := cl.LoadConfigMap(p.Lua.Script, namespace)
if err != nil {
return nil, err
Expand Down

0 comments on commit b117639

Please sign in to comment.