From b8ab9e9c261fa0c112455647d56e43c0ff535d53 Mon Sep 17 00:00:00 2001 From: Lukasz Zajaczkowski Date: Wed, 18 Dec 2024 16:43:27 +0100 Subject: [PATCH] add container --- internal/controller/kubecostextractor_controller.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 }