diff --git a/internal/controller/kubecostextractor_controller.go b/internal/controller/kubecostextractor_controller.go index abc8b73a..30c1422b 100644 --- a/internal/controller/kubecostextractor_controller.go +++ b/internal/controller/kubecostextractor_controller.go @@ -343,6 +343,9 @@ func (r *KubecostExtractorReconciler) convertClusterRecommendationAttributes(ctx if ok { result.Namespace = lo.ToPtr(namespace) } + if allocation.Properties.Container != "" { + result.Container = lo.ToPtr(allocation.Properties.Container) + } } namespace := "" if result.Namespace != nil { @@ -374,6 +377,5 @@ func convertCostAttributes(allocation opencost.Allocation) *console.CostAttribut if allocation.GPUAllocation != nil { attr.GpuUtil = allocation.GPUAllocation.GPUUsageAverage } - return attr }