Merge pull request #133817 from serathius/stats-logs
Disable collecting stats for resources not setting prefix to prevent error logs Kubernetes-commit: 947a8ebfd14fe14b25222a50be28accae80fbd2c
This commit is contained in:
commit
a68e6c2997
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue