Skip to content

Commit a9d896f

Browse files
authored
pod resource return volumes usage (#232)
1 parent fdfc485 commit a9d896f

File tree

6 files changed

+297
-281
lines changed

6 files changed

+297
-281
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ cscope.*
2828
tools/updatev4.go
2929
*.swp
3030
dist/*
31+
non-live.yaml

cluster/calcium/resource.go

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ func (c *Calcium) PodResource(ctx context.Context, podname string) (*types.PodRe
2525
CPUPercents: map[string]float64{},
2626
MemoryPercents: map[string]float64{},
2727
StoragePercents: map[string]float64{},
28+
VolumePercents: map[string]float64{},
2829
Verifications: map[string]bool{},
2930
Details: map[string]string{},
3031
}
@@ -36,6 +37,7 @@ func (c *Calcium) PodResource(ctx context.Context, podname string) (*types.PodRe
3637
r.CPUPercents[node.Name] = nodeDetail.CPUPercent
3738
r.MemoryPercents[node.Name] = nodeDetail.MemoryPercent
3839
r.StoragePercents[node.Name] = nodeDetail.StoragePercent
40+
r.VolumePercents[node.Name] = nodeDetail.VolumePercent
3941
r.Verifications[node.Name] = nodeDetail.Verification
4042
r.Details[node.Name] = strings.Join(nodeDetail.Details, "\n")
4143
}

0 commit comments

Comments
 (0)