Skip to content

Commit

Permalink
feat: syslog-ng handle empty flow match same way as if it was undefin…
Browse files Browse the repository at this point in the history
…ed (now for namespaced flows as well)

Signed-off-by: Peter Wilcsinszky <[email protected]>
  • Loading branch information
pepov committed Oct 27, 2023
1 parent 0fc842d commit 79f6484
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/sdk/logging/model/syslogng/config/flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func renderFlow(clusterOutputRefs map[string]types.NamespacedName, sourceName st
seqs.ToSlice(seqs.Concat(
seqs.FromValues(
filterRefStmt(nsFilterName),
render.If(f.Spec.Match != nil, filterRefStmt(matchName)),
render.If(!f.Spec.Match.IsEmpty(), filterRefStmt(matchName)),
),
seqs.MapWithIndex(seqs.FromSlice(f.Spec.Filters), func(idx int, flt v1beta1.SyslogNGFilter) render.Renderer {
return parenDefStmt(filterKind(flt), render.Literal(filterID(flt, idx, baseName)))
Expand Down

0 comments on commit 79f6484

Please sign in to comment.