Add PVCRef to VolumeStats

For pod volumes that reference a PVC, add a PVCRef to the corresponding
volume stat. This allows metrics to be indexed/queried by PVC name
which is more user-friendly than Pod reference
This commit is contained in:
Vaibhav Kamra
2017-08-16 20:57:24 -07:00
parent 01e961b380
commit 1ac56d8cbb
5 changed files with 181 additions and 7 deletions

View File

@@ -181,7 +181,8 @@ var _ = framework.KubeDescribe("Summary API", func() {
}),
"VolumeStats": gstruct.MatchAllElements(summaryObjectID, gstruct.Elements{
"test-empty-dir": gstruct.MatchAllFields(gstruct.Fields{
"Name": Equal("test-empty-dir"),
"Name": Equal("test-empty-dir"),
"PVCRef": BeNil(),
"FsStats": gstruct.MatchAllFields(gstruct.Fields{
"Time": recent(maxStatsAge),
"AvailableBytes": fsCapacityBounds,