Skip to content

Commit

Permalink
Merge pull request #1847 from kube-logging/release-4.10
Browse files Browse the repository at this point in the history
Forward port changes from release 4.10
  • Loading branch information
pepov authored Nov 11, 2024
2 parents da8532c + 14b7276 commit ef6f5b2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions pkg/resources/configcheck/configcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ type ConfigCheckCleaner struct {
labels client.MatchingLabels
}

func NewConfigCheckCleaner(c client.Client, component string) *ConfigCheckCleaner {
func NewConfigCheckCleaner(c client.Client, component string, logging string) *ConfigCheckCleaner {
return &ConfigCheckCleaner{
client: c,
labels: client.MatchingLabels{
"app.kubernetes.io/component": component,
"app.kubernetes.io/component": component,
"app.kubernetes.io/managed-by": logging,
},
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/fluentd/fluentd.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func (r *Reconciler) Reconcile(ctx context.Context) (*reconcile.Result, error) {
}

if result, ok := r.Logging.Status.ConfigCheckResults[hash]; ok {
cleaner := configcheck.NewConfigCheckCleaner(r.Client, ComponentConfigCheck)
cleaner := configcheck.NewConfigCheckCleaner(r.Client, ComponentConfigCheck, r.Logging.GetName())

var cleanupErrs error
cleanupErrs = errors.Append(cleanupErrs, cleaner.SecretCleanup(ctx, hash))
Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/syslogng/syslogng.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func (r *Reconciler) Reconcile(ctx context.Context) (*reconcile.Result, error) {

// Cleanup previous configcheck results
if result, ok := r.Logging.Status.ConfigCheckResults[hash]; ok {
cleaner := configcheck.NewConfigCheckCleaner(r.Client, ComponentConfigCheck)
cleaner := configcheck.NewConfigCheckCleaner(r.Client, ComponentConfigCheck, r.Logging.GetName())

var cleanupErrs error
cleanupErrs = errors.Append(cleanupErrs, cleaner.SecretCleanup(ctx, hash))
Expand Down

0 comments on commit ef6f5b2

Please sign in to comment.