Skip to content

Commit

Permalink
Merge pull request #31 from yjinjo/master
Browse files Browse the repository at this point in the history
Add idle tag
  • Loading branch information
yjinjo authored May 8, 2024
2 parents 22dfb38 + 0b5c9bf commit a99e125
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/plugin/manager/cost_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,19 +220,19 @@ def _make_additional_info(result: dict, service_account_id: str) -> dict:
"X-Scope-OrgID": service_account_id,
}

if cluster := result["metric"].get("cluster"):
if cluster := result["metric"].get("cluster", "__idle__"):
additional_info["Cluster"] = cluster

if node := result["metric"].get("node"):
if node := result["metric"].get("node", "__idle__"):
additional_info["Node"] = node

if namespace := result["metric"].get("namespace"):
if namespace := result["metric"].get("namespace", "__idle__"):
additional_info["Namespace"] = namespace

if pod := result["metric"].get("pod"):
if pod := result["metric"].get("pod", "__idle__"):
additional_info["Pod"] = pod

if container := result["metric"].get("container"):
if container := result["metric"].get("container", "__idle__"):
additional_info["Container"] = container

if pv := result["metric"].get("persistentvolume"):
Expand Down

0 comments on commit a99e125

Please sign in to comment.