Merge pull request #96946 from houjun41544/20201130

Define const for metric name
This commit is contained in:
Kubernetes Prow Robot 2020-12-08 21:04:53 -08:00 committed by GitHub
commit 80c1c0fc04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,6 +53,8 @@ const (
VolumeStatsInodesKey = "volume_stats_inodes"
VolumeStatsInodesFreeKey = "volume_stats_inodes_free"
VolumeStatsInodesUsedKey = "volume_stats_inodes_used"
RunningPodsKey = "running_pods"
RunningContainersKey = "running_containers"
// Metrics keys of remote runtime operations
RuntimeOperationsKey = "runtime_operations_total"
RuntimeOperationsDurationKey = "runtime_operations_duration_seconds"
@ -362,7 +364,7 @@ var (
RunningPodCount = metrics.NewGauge(
&metrics.GaugeOpts{
Subsystem: KubeletSubsystem,
Name: "running_pods",
Name: RunningPodsKey,
Help: "Number of pods currently running",
StabilityLevel: metrics.ALPHA,
},
@ -371,7 +373,7 @@ var (
RunningContainerCount = metrics.NewGaugeVec(
&metrics.GaugeOpts{
Subsystem: KubeletSubsystem,
Name: "running_containers",
Name: RunningContainersKey,
Help: "Number of containers currently running",
StabilityLevel: metrics.ALPHA,
},