Skip to content

Commit

Permalink
Merge pull request #123 from BapRx/fix/avoid-duplicate-pods
Browse files Browse the repository at this point in the history
fix(prometheus): Avoid appending duplicate pods
  • Loading branch information
LeaveMyYard authored Aug 10, 2023
2 parents 0d2c991 + cb927ee commit ea01100
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ async def load_pods(self, object: K8sObjectData, period: datetime.timedelta) ->
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
]
])

0 comments on commit ea01100

Please sign in to comment.