summaryrefslogtreecommitdiff
path: root/robusta_krr
diff options
context:
space:
mode:
authorPavel Zhukov <33721692+LeaveMyYard@users.noreply.github.com>2023-08-10 14:53:58 +0300
committerGitHub <noreply@github.com>2023-08-10 14:53:58 +0300
commitea01100ecf93af18f893933d821853b1f0ef79ce (patch)
tree0ef78dcf349e75005adc732d1f010d4a9c00d6d2 /robusta_krr
parent0d2c9916b2f728ccdacd4258129273d308765735 (diff)
parentcb927ee59d3647a9a6590b1afb39050827984737 (diff)
Merge pull request #123 from BapRx/fix/avoid-duplicate-pods
fix(prometheus): Avoid appending duplicate pods
Diffstat (limited to 'robusta_krr')
-rw-r--r--robusta_krr/core/integrations/prometheus/metrics_service/prometheus_metrics_service.py4
1 files changed, 2 insertions, 2 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 5480512..e97f754 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
@@ -209,7 +209,7 @@ class PrometheusMetricsService(MetricsService):
current_pods_set = {pod["metric"]["pod"] for pod in current_pods}
del current_pods
- object.pods += [
+ object.pods += set([
PodData(name=pod["metric"]["pod"], deleted=pod["metric"]["pod"] not in current_pods_set)
for pod in related_pods
- ]
+ ])