mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
fix comment
This commit is contained in:
parent
f96449f2e2
commit
5d544d3f01
@ -64,7 +64,7 @@ var (
|
||||
|
||||
volumeStatsHealthAbnormalDesc = metrics.NewDesc(
|
||||
metrics.BuildFQName("", kubeletmetrics.KubeletSubsystem, kubeletmetrics.VolumeStatsHealthStatusKey),
|
||||
"Volume health status. The count is either 1 or 0. When volume_health_status is abnormal, 1 indicates the volume is unhealthy, 0 indicates volume is healthy",
|
||||
"Abnormal volume health status. The count is either 1 or 0. When volume_health_status is abnormal, 1 indicates the volume is unhealthy, 0 indicates volume is healthy",
|
||||
[]string{"namespace", "persistentvolumeclaim", "volume_health_status"}, nil,
|
||||
metrics.ALPHA, "")
|
||||
)
|
||||
|
@ -47,7 +47,7 @@ func TestVolumeStatsCollector(t *testing.T) {
|
||||
# TYPE kubelet_volume_stats_inodes_used gauge
|
||||
# HELP kubelet_volume_stats_used_bytes [ALPHA] Number of used bytes in the volume
|
||||
# TYPE kubelet_volume_stats_used_bytes gauge
|
||||
# HELP kubelet_volume_stats_health_status [ALPHA] Volume health status. The count is either 1 or 0. When volume_health_status is abnormal, 1 indicates the volume is unhealthy, 0 indicates volume is healthy
|
||||
# HELP kubelet_volume_stats_health_status [ALPHA] Abnormal volume health status. The count is either 1 or 0. When volume_health_status is abnormal, 1 indicates the volume is unhealthy, 0 indicates volume is healthy
|
||||
# TYPE kubelet_volume_stats_health_status gauge
|
||||
`
|
||||
|
||||
|
@ -179,7 +179,6 @@ func (s *volumeStatCalculator) parsePodVolumeStats(podName string, pvcRef *stats
|
||||
|
||||
var (
|
||||
available, capacity, used, inodes, inodesFree, inodesUsed uint64
|
||||
volumeStats stats.VolumeStats
|
||||
)
|
||||
|
||||
if metric.Available != nil {
|
||||
@ -201,10 +200,13 @@ func (s *volumeStatCalculator) parsePodVolumeStats(podName string, pvcRef *stats
|
||||
inodesUsed = uint64(metric.InodesUsed.Value())
|
||||
}
|
||||
|
||||
volumeStats.FsStats = stats.FsStats{Time: metric.Time, AvailableBytes: &available, CapacityBytes: &capacity,
|
||||
UsedBytes: &used, Inodes: &inodes, InodesFree: &inodesFree, InodesUsed: &inodesUsed}
|
||||
volumeStats.Name = podName
|
||||
volumeStats.PVCRef = pvcRef
|
||||
volumeStats := stats.VolumeStats{
|
||||
Name: podName,
|
||||
PVCRef: pvcRef,
|
||||
FsStats: stats.FsStats{Time: metric.Time, AvailableBytes: &available, CapacityBytes: &capacity,
|
||||
UsedBytes: &used, Inodes: &inodes, InodesFree: &inodesFree, InodesUsed: &inodesUsed},
|
||||
}
|
||||
|
||||
if metric.Abnormal != nil {
|
||||
volumeStats.VolumeHealthStats = &stats.VolumeHealthStats{
|
||||
Abnormal: *metric.Abnormal,
|
||||
|
Loading…
Reference in New Issue
Block a user