mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
Merge pull request #115209 from dgrisonnet/cleanup-deprecated-metrics
Cleanup deprecated metrics
This commit is contained in:
commit
781daea7b2
@ -28,7 +28,6 @@ const (
|
|||||||
zoneHealthStatisticKey = "zone_health"
|
zoneHealthStatisticKey = "zone_health"
|
||||||
zoneSizeKey = "zone_size"
|
zoneSizeKey = "zone_size"
|
||||||
zoneNoUnhealthyNodesKey = "unhealthy_nodes_in_zone"
|
zoneNoUnhealthyNodesKey = "unhealthy_nodes_in_zone"
|
||||||
evictionsNumberKey = "evictions_number"
|
|
||||||
evictionsTotalKey = "evictions_total"
|
evictionsTotalKey = "evictions_total"
|
||||||
|
|
||||||
updateNodeHealthKey = "update_node_health_duration_seconds"
|
updateNodeHealthKey = "update_node_health_duration_seconds"
|
||||||
@ -63,16 +62,6 @@ var (
|
|||||||
},
|
},
|
||||||
[]string{"zone"},
|
[]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(
|
evictionsTotal = metrics.NewCounterVec(
|
||||||
&metrics.CounterOpts{
|
&metrics.CounterOpts{
|
||||||
Subsystem: nodeControllerSubsystem,
|
Subsystem: nodeControllerSubsystem,
|
||||||
@ -111,7 +100,6 @@ func Register() {
|
|||||||
legacyregistry.MustRegister(zoneHealth)
|
legacyregistry.MustRegister(zoneHealth)
|
||||||
legacyregistry.MustRegister(zoneSize)
|
legacyregistry.MustRegister(zoneSize)
|
||||||
legacyregistry.MustRegister(unhealthyNodes)
|
legacyregistry.MustRegister(unhealthyNodes)
|
||||||
legacyregistry.MustRegister(evictionsNumber)
|
|
||||||
legacyregistry.MustRegister(evictionsTotal)
|
legacyregistry.MustRegister(evictionsTotal)
|
||||||
legacyregistry.MustRegister(updateNodeHealthDuration)
|
legacyregistry.MustRegister(updateNodeHealthDuration)
|
||||||
legacyregistry.MustRegister(updateAllNodesHealthDuration)
|
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)
|
result := controllerutil.SwapNodeControllerTaint(ctx, nc.kubeClient, []*v1.Taint{&taintToAdd}, []*v1.Taint{&oppositeTaint}, node)
|
||||||
if result {
|
if result {
|
||||||
//count the evictionsNumber
|
// Count the number of evictions.
|
||||||
zone := nodetopology.GetZoneKey(node)
|
zone := nodetopology.GetZoneKey(node)
|
||||||
evictionsNumber.WithLabelValues(zone).Inc()
|
|
||||||
evictionsTotal.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))
|
flowcontrol.NewTokenBucketRateLimiter(nc.evictionLimiterQPS, scheduler.EvictionRateLimiterBurst))
|
||||||
// Init the metric for the new zone.
|
// Init the metric for the new zone.
|
||||||
logger.Info("Initializing eviction metric for zone", "zone", zone)
|
logger.Info("Initializing eviction metric for zone", "zone", zone)
|
||||||
evictionsNumber.WithLabelValues(zone).Add(0)
|
|
||||||
evictionsTotal.WithLabelValues(zone).Add(0)
|
evictionsTotal.WithLabelValues(zone).Add(0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,15 +66,6 @@ var (
|
|||||||
StabilityLevel: metrics.STABLE,
|
StabilityLevel: metrics.STABLE,
|
||||||
}, []string{"result", "profile"})
|
}, []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(
|
schedulingLatency = metrics.NewHistogramVec(
|
||||||
&metrics.HistogramOpts{
|
&metrics.HistogramOpts{
|
||||||
Subsystem: SchedulerSubsystem,
|
Subsystem: SchedulerSubsystem,
|
||||||
@ -219,7 +210,6 @@ var (
|
|||||||
|
|
||||||
metricsList = []metrics.Registerable{
|
metricsList = []metrics.Registerable{
|
||||||
scheduleAttempts,
|
scheduleAttempts,
|
||||||
e2eSchedulingLatency,
|
|
||||||
schedulingLatency,
|
schedulingLatency,
|
||||||
SchedulingAlgorithmLatency,
|
SchedulingAlgorithmLatency,
|
||||||
PreemptionVictims,
|
PreemptionVictims,
|
||||||
|
@ -43,7 +43,6 @@ func PodScheduleError(profile string, duration float64) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func observeScheduleAttemptAndLatency(result, profile string, duration float64) {
|
func observeScheduleAttemptAndLatency(result, profile string, duration float64) {
|
||||||
e2eSchedulingLatency.WithLabelValues(result, profile).Observe(duration)
|
|
||||||
schedulingLatency.WithLabelValues(result, profile).Observe(duration)
|
schedulingLatency.WithLabelValues(result, profile).Observe(duration)
|
||||||
scheduleAttempts.WithLabelValues(result, profile).Inc()
|
scheduleAttempts.WithLabelValues(result, profile).Inc()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user