Merge pull request #131425 from carlory/follow-up-128810

Remove deprecated scheduler cache metrics
This commit is contained in:
Kubernetes Prow Robot
2025-04-24 04:56:29 -07:00
committed by GitHub
2 changed files with 2 additions and 23 deletions

View File

@@ -757,12 +757,4 @@ func (cache *cacheImpl) updateMetrics() {
metrics.CacheSize.WithLabelValues("assumed_pods").Set(float64(len(cache.assumedPods)))
metrics.CacheSize.WithLabelValues("pods").Set(float64(len(cache.podStates)))
metrics.CacheSize.WithLabelValues("nodes").Set(float64(len(cache.nodes)))
// we intentionally keep them with the deprecation and will remove at v1.34.
//nolint:staticcheck
metrics.SchedulerCacheSize.WithLabelValues("assumed_pods").Set(float64(len(cache.assumedPods)))
//nolint:staticcheck
metrics.SchedulerCacheSize.WithLabelValues("pods").Set(float64(len(cache.podStates)))
//nolint:staticcheck
metrics.SchedulerCacheSize.WithLabelValues("nodes").Set(float64(len(cache.nodes)))
}

View File

@@ -107,11 +107,8 @@ var (
FrameworkExtensionPointDuration *metrics.HistogramVec
PluginExecutionDuration *metrics.HistogramVec
PermitWaitDuration *metrics.HistogramVec
CacheSize *metrics.GaugeVec
// Deprecated: SchedulerCacheSize is deprecated,
// and will be removed at v1.34. Please use CacheSize instead.
SchedulerCacheSize *metrics.GaugeVec
PermitWaitDuration *metrics.HistogramVec
CacheSize *metrics.GaugeVec
unschedulableReasons *metrics.GaugeVec
PluginEvaluationTotal *metrics.CounterVec
@@ -294,15 +291,6 @@ func InitMetrics() {
},
[]string{"result"})
SchedulerCacheSize = metrics.NewGaugeVec(
&metrics.GaugeOpts{
Subsystem: SchedulerSubsystem,
Name: "scheduler_cache_size",
Help: "Number of nodes, pods, and assumed (bound) pods in the scheduler cache.",
StabilityLevel: metrics.ALPHA,
DeprecatedVersion: "1.33.0",
}, []string{"type"})
CacheSize = metrics.NewGaugeVec(
&metrics.GaugeOpts{
Subsystem: SchedulerSubsystem,
@@ -362,7 +350,6 @@ func InitMetrics() {
Goroutines,
PermitWaitDuration,
CacheSize,
SchedulerCacheSize,
unschedulableReasons,
PluginEvaluationTotal,
}