diff options
| author | Robusta Runner <aantny@gmail.com> | 2024-03-02 09:33:19 +0200 |
|---|---|---|
| committer | Robusta Runner <aantny@gmail.com> | 2024-03-02 09:33:19 +0200 |
| commit | cf9533e34d22a45156d3cc56bb5a16defdc50a75 (patch) | |
| tree | b46553a9d8f879418e833170cd0cb065f1e8a0d3 /robusta_krr | |
| parent | 4b87b60319d9208a1e45acdb8ab9b988c41a5681 (diff) | |
Fix bug that caused a fallback to loading pod names from the APIServer and not Prometheus
Diffstat (limited to 'robusta_krr')
| -rw-r--r-- | robusta_krr/core/integrations/prometheus/metrics_service/prometheus_metrics_service.py | 3 |
1 files changed, 3 insertions, 0 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 c628de7..4b67309 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 @@ -190,6 +190,7 @@ class PrometheusMetricsService(MetricsService): }}[{period_literal}] """ ) + replicasets = replicasets["result"] pod_owners = [replicaset["metric"]["replicaset"] for replicaset in replicasets] pod_owner_kind = "ReplicaSet" @@ -211,6 +212,7 @@ class PrometheusMetricsService(MetricsService): ) """ ) + related_pods_result = related_pods_result["result"] if related_pods_result == []: return [] @@ -231,6 +233,7 @@ class PrometheusMetricsService(MetricsService): }} == 1 """ ) + pods_status_result = pods_status_result["result"] current_pods_set |= {pod["metric"]["pod"] for pod in pods_status_result} del pods_status_result |
