Skip to content

Commit ef6f5b2

Browse files
authored
Merge pull request #1847 from kube-logging/release-4.10
Forward port changes from release 4.10
2 parents da8532c + 14b7276 commit ef6f5b2

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

pkg/resources/configcheck/configcheck.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,12 @@ type ConfigCheckCleaner struct {
4646
labels client.MatchingLabels
4747
}
4848

49-
func NewConfigCheckCleaner(c client.Client, component string) *ConfigCheckCleaner {
49+
func NewConfigCheckCleaner(c client.Client, component string, logging string) *ConfigCheckCleaner {
5050
return &ConfigCheckCleaner{
5151
client: c,
5252
labels: client.MatchingLabels{
53-
"app.kubernetes.io/component": component,
53+
"app.kubernetes.io/component": component,
54+
"app.kubernetes.io/managed-by": logging,
5455
},
5556
}
5657
}

pkg/resources/fluentd/fluentd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func (r *Reconciler) Reconcile(ctx context.Context) (*reconcile.Result, error) {
168168
}
169169

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

173173
var cleanupErrs error
174174
cleanupErrs = errors.Append(cleanupErrs, cleaner.SecretCleanup(ctx, hash))

pkg/resources/syslogng/syslogng.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ func (r *Reconciler) Reconcile(ctx context.Context) (*reconcile.Result, error) {
142142

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

147147
var cleanupErrs error
148148
cleanupErrs = errors.Append(cleanupErrs, cleaner.SecretCleanup(ctx, hash))

0 commit comments

Comments
 (0)