diff --git a/server/dvo_handlers.go b/server/dvo_handlers.go index fce05a13..d084dc60 100644 --- a/server/dvo_handlers.go +++ b/server/dvo_handlers.go @@ -92,6 +92,7 @@ type DVORecommendation struct { type DVOObject struct { Kind string `json:"kind"` UID string `json:"uid"` + Name string `json:"display_name"` } // readNamespace retrieves namespace UUID from request @@ -289,6 +290,7 @@ func (server *HTTPServer) ProcessSingleDVONamespace(workload types.DVOReport) ( filteredObjects = append(filteredObjects, DVOObject{ Kind: object.Kind, UID: object.UID, + Name: object.Name, }) } @@ -319,3 +321,5 @@ func (server *HTTPServer) ProcessSingleDVONamespace(workload types.DVOReport) ( return } + +/**/ diff --git a/server/dvo_handlers_test.go b/server/dvo_handlers_test.go index f0288c87..ba2769a7 100644 --- a/server/dvo_handlers_test.go +++ b/server/dvo_handlers_test.go @@ -200,10 +200,12 @@ func TestProcessSingleDVONamespace_MustFilterZeroObjects_CCXDEV_12589_Reproducer { UID: "193a2099-0000-1111-916a-d570c9aac158", Kind: "Pod", + Name: "test-name-0001", }, { UID: "193a2099-1234-5678-916a-d570c9aac158", Kind: "DaemonSet", + Name: "test-name-0099", }, } assert.ElementsMatch(t, expectedObjects, processedWorkload.Recommendations[0].Objects)