Skip to content

Commit a4d5be4

Browse files
Merge pull request #17265 from bparees/top_images
Automatic merge from submit-queue. fix off by one error in oc adm top images edge creation before, the second image in the history is reported with an imagestream reference (though no actual tag value). ``` $ oc adm top images -n test NAME IMAGESTREAMTAG PARENTS USAGE METADATA STORAGE sha256:a39050fbf26335a80876dfbafb47a6c0df8e9a728141cfc7723d506d1fc42acb test/origin-ruby-sample (latest) sha256:cf44f7a05f... Deployment: test/frontend-3, Deployment: test/frontend-3 no 188.7 MiB sha256:30d3c1dd270158b7909c50f7dee5e92a43fbe7df300d673ab10cf8f3c7b27475 test/origin-ruby-sample () sha256:cf44f7a05f... <none> no 188.7 MiB ``` after, it is correctly reported with an IST of "none" ``` $ oc adm top images -n test NAME IMAGESTREAMTAG PARENTS USAGE METADATA STORAGE sha256:a39050fbf26335a80876dfbafb47a6c0df8e9a728141cfc7723d506d1fc42acb test/origin-ruby-sample (latest) sha256:cf44f7a05f... Deployment: test/frontend-3, Deployment: test/frontend-3 no 188.7 MiB sha256:30d3c1dd270158b7909c50f7dee5e92a43fbe7df300d673ab10cf8f3c7b27475 <none> sha256:cf44f7a05f... <none> no 188.7 MiB ```
2 parents 31c4664 + 5f589fc commit a4d5be4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/oc/admin/top/graph.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func addImageStreamsToGraph(g graph.Graph, streams *imageapi.ImageStreamList) {
8282
}
8383
glog.V(4).Infof("Adding edge from %q to %q", imageStreamNode.UniqueName(), imageNode.UniqueName())
8484
edgeKind := ImageStreamImageEdgeKind
85-
if i > 1 {
85+
if i > 0 {
8686
edgeKind = HistoricImageStreamImageEdgeKind
8787
}
8888
g.AddEdge(imageStreamNode, imageNode, edgeKind)

0 commit comments

Comments
 (0)