From 50147bd63ea57246d6b2653a849fb16da26f6339 Mon Sep 17 00:00:00 2001 From: LeaveMyYard Date: Mon, 4 Mar 2024 17:54:41 +0200 Subject: [PATCH] Fix ["result"] usage in metric_service --- .../prometheus/metrics_service/prometheus_metrics_service.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/robusta_krr/core/integrations/prometheus/metrics_service/prometheus_metrics_service.py b/robusta_krr/core/integrations/prometheus/metrics_service/prometheus_metrics_service.py index 017c0b25..b4285997 100644 --- a/robusta_krr/core/integrations/prometheus/metrics_service/prometheus_metrics_service.py +++ b/robusta_krr/core/integrations/prometheus/metrics_service/prometheus_metrics_service.py @@ -224,7 +224,6 @@ async def load_pods(self, object: K8sObjectData, period: timedelta) -> list[PodD }}[{period_literal}] """ ) - replicasets = replicasets["result"] pod_owners = [replicaset["metric"]["replicaset"] for replicaset in replicasets] pod_owner_kind = "ReplicaSet" @@ -246,7 +245,6 @@ async def load_pods(self, object: K8sObjectData, period: timedelta) -> list[PodD ) """ ) - related_pods_result = related_pods_result["result"] if related_pods_result == []: return [] @@ -267,7 +265,6 @@ async def load_pods(self, object: K8sObjectData, period: timedelta) -> list[PodD }} == 1 """ ) - pods_status_result = pods_status_result["result"] current_pods_set |= {pod["metric"]["pod"] for pod in pods_status_result} del pods_status_result