Skip to content

Commit

Permalink
Merge pull request #1059 from MisterMX/fix/custom-plugins-hash
Browse files Browse the repository at this point in the history
fix(fluentd): Use custom plugin content for hash generation
  • Loading branch information
benjaminhuo authored Feb 7, 2024
2 parents 1870e8c + 3b07de3 commit 4233bb7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions apis/fluentd/v1alpha1/plugins/params/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ func (ps *PluginStore) Hash() string {
c.Store[k] = v
}

// Custom plugins don't have stored properties but only contain the config
// as plain text.
// Set the content here to avoid generating the same hash code for all
// custom plugins resulting in only one custom plugin being ever set for
// one config.
c.Content = ps.Content

c.InsertChilds(ps.Childs...)
return utils.HashCode(c.String())
}
Expand Down

0 comments on commit 4233bb7

Please sign in to comment.