瀏覽代碼

only handle unmounted case

Signed-off-by: Alex Meijer <ameijer@kubecost.com>
Alex Meijer 3 年之前
父節點
當前提交
4fe3a923ee
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      pkg/kubecost/allocationprops.go

+ 2 - 2
pkg/kubecost/allocationprops.go

@@ -456,10 +456,10 @@ func (p *AllocationProperties) Intersection(that *AllocationProperties) *Allocat
 			// This logic is designed to effectively ignore the unmounted/unallocated objects
 			// and just copy over the labels from the other object - we only take the intersection
 			// of 'legitimate' allocations.
-			if p.Container == UnmountedSuffix || p.Container == UnallocatedSuffix {
+			if p.Container == UnmountedSuffix {
 				intersectionProps.Annotations = that.Annotations
 				intersectionProps.Labels = that.Labels
-			} else if that.Container == UnmountedSuffix || that.Container == UnallocatedSuffix {
+			} else if that.Container == UnmountedSuffix {
 				intersectionProps.Annotations = p.Annotations
 				intersectionProps.Labels = p.Labels
 			} else {