adding evictions_total metric and marking evictions_number deprecated

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
cyclinder
2021-12-10 19:16:34 +08:00
parent cc6f12583f
commit b88b51c6e5
3 changed files with 25 additions and 2 deletions

View File

@@ -29,6 +29,7 @@ const (
zoneSizeKey = "zone_size"
zoneNoUnhealthyNodesKey = "unhealthy_nodes_in_zone"
evictionsNumberKey = "evictions_number"
evictionsTotalKey = "evictions_total"
)
var (
@@ -60,11 +61,21 @@ 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,
Name: evictionsNumberKey,
Name: evictionsTotalKey,
Help: "Number of Node evictions that happened since current instance of NodeController started.",
StabilityLevel: metrics.ALPHA,
StabilityLevel: metrics.STABLE,
},
[]string{"zone"},
)
@@ -79,5 +90,6 @@ func Register() {
legacyregistry.MustRegister(zoneSize)
legacyregistry.MustRegister(unhealthyNodes)
legacyregistry.MustRegister(evictionsNumber)
legacyregistry.MustRegister(evictionsTotal)
})
}