mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-02-22 07:03:28 +00:00
Merge pull request #133817 from serathius/stats-logs
Disable collecting stats for resources not setting prefix to prevent error logs
This commit is contained in:
@@ -186,7 +186,8 @@ func New(c *kubernetes.Client, compactor Compactor, codec runtime.Codec, newFunc
|
||||
newListFunc: newListFunc,
|
||||
compactor: compactor,
|
||||
}
|
||||
if utilfeature.DefaultFeatureGate.Enabled(features.SizeBasedListCostEstimate) {
|
||||
// Collecting stats requires properly set resourcePrefix to call getKeys.
|
||||
if resourcePrefix != "" && utilfeature.DefaultFeatureGate.Enabled(features.SizeBasedListCostEstimate) {
|
||||
stats := newStatsCache(pathPrefix, s.getKeys)
|
||||
s.stats = stats
|
||||
w.stats = stats
|
||||
|
||||
Reference in New Issue
Block a user