diff --git a/pkg/controller/nodelifecycle/metrics.go b/pkg/controller/nodelifecycle/metrics.go index fa0870d96f4..fcd5e08cfab 100644 --- a/pkg/controller/nodelifecycle/metrics.go +++ b/pkg/controller/nodelifecycle/metrics.go @@ -28,7 +28,6 @@ const ( zoneHealthStatisticKey = "zone_health" zoneSizeKey = "zone_size" zoneNoUnhealthyNodesKey = "unhealthy_nodes_in_zone" - evictionsNumberKey = "evictions_number" evictionsTotalKey = "evictions_total" updateNodeHealthKey = "update_node_health_duration_seconds" @@ -63,16 +62,6 @@ var ( }, []string{"zone"}, ) - evictionsNumber = metrics.NewCounterVec( - &metrics.CounterOpts{ - Subsystem: nodeControllerSubsystem, - Name: evictionsNumberKey, - Help: "Number of Node evictions that happened since current instance of NodeController started, This metric is replaced by node_collector_evictions_total.", - DeprecatedVersion: "1.24.0", - StabilityLevel: metrics.ALPHA, - }, - []string{"zone"}, - ) evictionsTotal = metrics.NewCounterVec( &metrics.CounterOpts{ Subsystem: nodeControllerSubsystem, @@ -111,7 +100,6 @@ func Register() { legacyregistry.MustRegister(zoneHealth) legacyregistry.MustRegister(zoneSize) legacyregistry.MustRegister(unhealthyNodes) - legacyregistry.MustRegister(evictionsNumber) legacyregistry.MustRegister(evictionsTotal) legacyregistry.MustRegister(updateNodeHealthDuration) legacyregistry.MustRegister(updateAllNodesHealthDuration) diff --git a/pkg/controller/nodelifecycle/node_lifecycle_controller.go b/pkg/controller/nodelifecycle/node_lifecycle_controller.go index ad1c05ad21c..242c4b30b15 100644 --- a/pkg/controller/nodelifecycle/node_lifecycle_controller.go +++ b/pkg/controller/nodelifecycle/node_lifecycle_controller.go @@ -643,9 +643,8 @@ func (nc *Controller) doNoExecuteTaintingPass(ctx context.Context) { } result := controllerutil.SwapNodeControllerTaint(ctx, nc.kubeClient, []*v1.Taint{&taintToAdd}, []*v1.Taint{&oppositeTaint}, node) if result { - //count the evictionsNumber + // Count the number of evictions. zone := nodetopology.GetZoneKey(node) - evictionsNumber.WithLabelValues(zone).Inc() evictionsTotal.WithLabelValues(zone).Inc() } @@ -1222,7 +1221,6 @@ func (nc *Controller) addPodEvictorForNewZone(logger klog.Logger, node *v1.Node) flowcontrol.NewTokenBucketRateLimiter(nc.evictionLimiterQPS, scheduler.EvictionRateLimiterBurst)) // Init the metric for the new zone. logger.Info("Initializing eviction metric for zone", "zone", zone) - evictionsNumber.WithLabelValues(zone).Add(0) evictionsTotal.WithLabelValues(zone).Add(0) } } diff --git a/pkg/scheduler/metrics/metrics.go b/pkg/scheduler/metrics/metrics.go index f2632bf80b9..5ee59a430f0 100644 --- a/pkg/scheduler/metrics/metrics.go +++ b/pkg/scheduler/metrics/metrics.go @@ -66,15 +66,6 @@ var ( StabilityLevel: metrics.STABLE, }, []string{"result", "profile"}) - e2eSchedulingLatency = metrics.NewHistogramVec( - &metrics.HistogramOpts{ - Subsystem: SchedulerSubsystem, - Name: "e2e_scheduling_duration_seconds", - DeprecatedVersion: "1.23.0", - Help: "E2e scheduling latency in seconds (scheduling algorithm + binding). This metric is replaced by scheduling_attempt_duration_seconds.", - Buckets: metrics.ExponentialBuckets(0.001, 2, 15), - StabilityLevel: metrics.ALPHA, - }, []string{"result", "profile"}) schedulingLatency = metrics.NewHistogramVec( &metrics.HistogramOpts{ Subsystem: SchedulerSubsystem, @@ -219,7 +210,6 @@ var ( metricsList = []metrics.Registerable{ scheduleAttempts, - e2eSchedulingLatency, schedulingLatency, SchedulingAlgorithmLatency, PreemptionVictims, diff --git a/pkg/scheduler/metrics/profile_metrics.go b/pkg/scheduler/metrics/profile_metrics.go index b844ef68746..cf7fa4249c8 100644 --- a/pkg/scheduler/metrics/profile_metrics.go +++ b/pkg/scheduler/metrics/profile_metrics.go @@ -43,7 +43,6 @@ func PodScheduleError(profile string, duration float64) { } func observeScheduleAttemptAndLatency(result, profile string, duration float64) { - e2eSchedulingLatency.WithLabelValues(result, profile).Observe(duration) schedulingLatency.WithLabelValues(result, profile).Observe(duration) scheduleAttempts.WithLabelValues(result, profile).Inc() }