Skip to content

Commit

Permalink
chore: add idle tag
Browse files Browse the repository at this point in the history
Signed-off-by: Youngjin Jo <youngjinjo@megazone.com>
  • Loading branch information
yjinjo committed May 8, 2024
1 parent 4eacd52 commit 0b5c9bf
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 0b5c9bf

Please sign in to comment.