mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-05-28 04:04:39 -04: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:
commit
947a8ebfd1
1 changed files with 2 additions and 1 deletions
|
|
@ -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 a new issue