Explorar o código

only handle unmounted case

Signed-off-by: Alex Meijer <ameijer@kubecost.com>
Alex Meijer %!s(int64=3) %!d(string=hai) anos
pai
achega
4fe3a923ee
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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 {