Skip to content

Commit 8632463

Browse files
committed
🌱 Do not deduplicate warnings by default
Controllers are long-running processes, and deduplication, as implemented, increases memory use. With this change, duplicate warnings will appear in the log by default. However, this is safe, because Kubernetes rotates container logs by default. If a specific controller sees many duplicate warnings, it can configure the handler to deduplicate them.
1 parent 2eb879f commit 8632463

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/client/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ func newClient(config *rest.Config, options Options) (*client, error) {
113113
}
114114

115115
if config.WarningHandler == nil {
116-
// By default, we de-duplicate and surface warnings.
116+
// By default, we surface warnings.
117117
config.WarningHandler = log.NewKubeAPIWarningLogger(
118118
log.Log.WithName("KubeAPIWarningLogger"),
119119
log.KubeAPIWarningLoggerOptions{
120-
Deduplicate: true,
120+
Deduplicate: false,
121121
},
122122
)
123123
}

0 commit comments

Comments
 (0)