From 650666406e1619440eeef3b729c3659027ebeb0e Mon Sep 17 00:00:00 2001 From: pacoxu Date: Wed, 21 Apr 2021 15:51:02 +0800 Subject: [PATCH] update kubelet_running_pods metrics comments: pods that have a running pod sandbox Signed-off-by: pacoxu Co-authored-by: Elana Hashman --- pkg/kubelet/metrics/metrics.go | 5 +++-- pkg/kubelet/pleg/generic_test.go | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/kubelet/metrics/metrics.go b/pkg/kubelet/metrics/metrics.go index 6fb40e1875b..aa256093be0 100644 --- a/pkg/kubelet/metrics/metrics.go +++ b/pkg/kubelet/metrics/metrics.go @@ -412,12 +412,13 @@ var ( []string{"runtime_handler"}, ) - // RunningPodCount is a gauge that tracks the number of Pods currently running + // RunningPodCount is a gauge that tracks the number of Pods currently with a running sandbox + // It is used to expose the kubelet internal state: how many pods have running containers in the container runtime, and mainly for debugging purpose. RunningPodCount = metrics.NewGauge( &metrics.GaugeOpts{ Subsystem: KubeletSubsystem, Name: RunningPodsKey, - Help: "Number of pods currently running", + Help: "Number of pods that have a running pod sandbox", StabilityLevel: metrics.ALPHA, }, ) diff --git a/pkg/kubelet/pleg/generic_test.go b/pkg/kubelet/pleg/generic_test.go index a13ea118c40..f5fe0bde3cc 100644 --- a/pkg/kubelet/pleg/generic_test.go +++ b/pkg/kubelet/pleg/generic_test.go @@ -702,7 +702,7 @@ kubelet_running_containers{container_state="unknown"} 2 name: "test pod count", metricsName: "kubelet_running_pods", wants: ` -# HELP kubelet_running_pods [ALPHA] Number of pods currently running +# HELP kubelet_running_pods [ALPHA] Number of pods that have a running pod sandbox # TYPE kubelet_running_pods gauge kubelet_running_pods 2 `,