mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Cleanup deprecated metrics
Remove the following deprecated metrics: - node_collector_evictions_number - scheduler_e2e_scheduling_duration_seconds Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
This commit is contained in:
parent
de9ce03f19
commit
ac394c5c19
@ -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)
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user