Skip to content

Commit

Permalink
return entire node instead of subset with lack of knowledge of return…
Browse files Browse the repository at this point in the history
… values

Signed-off-by: Alan Rodrigues <alanr5691@yahoo.com>
  • Loading branch information
avrodrigues5 committed Feb 17, 2023
1 parent e9188bb commit 3cc7ce4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/kubecost/asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -3179,18 +3179,17 @@ func (as *AssetSet) accumulate(that *AssetSet) (*AssetSet, error) {
return acc, nil
}

func (as *AssetSet) MonitoredPropsOfCloudCostItem(cci *CloudCostItem) (time.Time, string, string) {
func (as *AssetSet) MonitoredNodeForCloudCostItem(cci *CloudCostItem) *Node {
for _, node := range as.Nodes {
if node.MonitoringKey() == cci.MonitoringKey() {
props := node.GetProperties()
if props == nil {
continue
}
// To-DO: No match between cluster ID and Node here?
return node.End, props.Cluster, ""
return node
}
}
return time.Time{}, "", ""
return nil
}

type DiffKind string
Expand Down

0 comments on commit 3cc7ce4

Please sign in to comment.