From e07527b5c2137a36ca704568d36d3108cb4079e3 Mon Sep 17 00:00:00 2001 From: Youngjin Jo Date: Fri, 17 May 2024 12:04:24 +0900 Subject: [PATCH] chore: add pv info to node, vice versa Signed-off-by: Youngjin Jo --- src/plugin/manager/cost_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugin/manager/cost_manager.py b/src/plugin/manager/cost_manager.py index 97855c8..171c91d 100644 --- a/src/plugin/manager/cost_manager.py +++ b/src/plugin/manager/cost_manager.py @@ -225,7 +225,7 @@ def _make_additional_info(result: dict, service_account_id: str) -> dict: if cluster := result["metric"].get("cluster"): additional_info["Cluster"] = cluster - if node := result["metric"].get("node"): + if node := result["metric"].get("node", "PVs"): additional_info["Node"] = node if namespace := result["metric"].get("namespace"): @@ -237,7 +237,7 @@ def _make_additional_info(result: dict, service_account_id: str) -> dict: if container := result["metric"].get("container"): additional_info["Container"] = container - if pv := result["metric"].get("persistentvolume"): + if pv := result["metric"].get("persistentvolume", "Nodes"): additional_info["PV"] = pv if service := result["metric"].get("service_name"):