File tree Expand file tree Collapse file tree 3 files changed +13
-16
lines changed
staging/src/k8s.io/component-base/metrics/testutil Expand file tree Collapse file tree 3 files changed +13
-16
lines changed Original file line number Diff line number Diff line change @@ -349,7 +349,7 @@ var (
349
349
RunningPodCount = metrics .NewGauge (
350
350
& metrics.GaugeOpts {
351
351
Subsystem : KubeletSubsystem ,
352
- Name : "running_pod_count " ,
352
+ Name : "running_pods " ,
353
353
Help : "Number of pods currently running" ,
354
354
StabilityLevel : metrics .ALPHA ,
355
355
},
@@ -358,7 +358,7 @@ var (
358
358
RunningContainerCount = metrics .NewGaugeVec (
359
359
& metrics.GaugeOpts {
360
360
Subsystem : KubeletSubsystem ,
361
- Name : "running_container_count " ,
361
+ Name : "running_containers " ,
362
362
Help : "Number of containers currently running" ,
363
363
StabilityLevel : metrics .ALPHA ,
364
364
},
Original file line number Diff line number Diff line change @@ -682,22 +682,22 @@ func TestRunningPodAndContainerCount(t *testing.T) {
682
682
}{
683
683
{
684
684
name : "test container count" ,
685
- metricsName : "kubelet_running_container_count " ,
685
+ metricsName : "kubelet_running_containers " ,
686
686
wants : `
687
- # HELP kubelet_running_container_count [ALPHA] Number of containers currently running
688
- # TYPE kubelet_running_container_count gauge
689
- kubelet_running_container_count {container_state="exited"} 1
690
- kubelet_running_container_count {container_state="running"} 1
691
- kubelet_running_container_count {container_state="unknown"} 2
687
+ # HELP kubelet_running_containers [ALPHA] Number of containers currently running
688
+ # TYPE kubelet_running_containers gauge
689
+ kubelet_running_containers {container_state="exited"} 1
690
+ kubelet_running_containers {container_state="running"} 1
691
+ kubelet_running_containers {container_state="unknown"} 2
692
692
` ,
693
693
},
694
694
{
695
695
name : "test pod count" ,
696
- metricsName : "kubelet_running_pod_count " ,
696
+ metricsName : "kubelet_running_pods " ,
697
697
wants : `
698
- # HELP kubelet_running_pod_count [ALPHA] Number of pods currently running
699
- # TYPE kubelet_running_pod_count gauge
700
- kubelet_running_pod_count 2
698
+ # HELP kubelet_running_pods [ALPHA] Number of pods currently running
699
+ # TYPE kubelet_running_pods gauge
700
+ kubelet_running_pods 2
701
701
` ,
702
702
},
703
703
}
Original file line number Diff line number Diff line change @@ -64,12 +64,9 @@ var exceptionMetrics = []string{
64
64
"node_collector_evictions_number" ,
65
65
66
66
// k8s.io/kubernetes/pkg/kubelet/server/stats
67
+ // The two metrics have been deprecated and will be removed in release v1.20+.
67
68
"container_cpu_usage_seconds_total" , // non-counter metrics should not have "_total" suffix
68
69
"node_cpu_usage_seconds_total" , // non-counter metrics should not have "_total" suffix
69
-
70
- // k8s.io/kubernetes/pkg/kubelet/pleg
71
- "kubelet_running_container_count" , // non-histogram and non-summary metrics should not have "_count" suffix
72
- "kubelet_running_pod_count" , // non-histogram and non-summary metrics should not have "_count" suffix
73
70
}
74
71
75
72
// A Problem is an issue detected by a Linter.
You can’t perform that action at this time.
0 commit comments