Explorar o código

retains idle cost from alloc as this function is used in clickhouse to regenerate summary allocation after shared cost is applied (#3034)

Signed-off-by: Alan Rodrigues <alanr5691@yahoo.com>
Alan Rodrigues hai 1 ano
pai
achega
6640e7650f
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      core/pkg/opencost/summaryallocation.go

+ 3 - 0
core/pkg/opencost/summaryallocation.go

@@ -71,15 +71,18 @@ func NewSummaryAllocation(alloc *Allocation, reconcile, reconcileNetwork bool) *
 		CPUCoreRequestAverage:  alloc.CPUCoreRequestAverage,
 		CPUCoreUsageAverage:    alloc.CPUCoreUsageAverage,
 		CPUCost:                alloc.CPUCost + alloc.CPUCostAdjustment,
+		CPUCostIdle:            alloc.CPUCostIdle,
 		GPURequestAverage:      gpuRequestAvg,
 		GPUUsageAverage:        gpuUsageAvg,
 		GPUCost:                alloc.GPUCost + alloc.GPUCostAdjustment,
+		GPUCostIdle:            alloc.GPUCostIdle,
 		NetworkCost:            alloc.NetworkCost + alloc.NetworkCostAdjustment,
 		LoadBalancerCost:       alloc.LoadBalancerCost + alloc.LoadBalancerCostAdjustment,
 		PVCost:                 alloc.PVCost() + alloc.PVCostAdjustment,
 		RAMBytesRequestAverage: alloc.RAMBytesRequestAverage,
 		RAMBytesUsageAverage:   alloc.RAMBytesUsageAverage,
 		RAMCost:                alloc.RAMCost + alloc.RAMCostAdjustment,
+		RAMCostIdle:            alloc.RAMCostIdle,
 		SharedCost:             alloc.SharedCost,
 		ExternalCost:           alloc.ExternalCost,
 		UnmountedPVCost:        alloc.UnmountedPVCost,