Skip to content

Commit

Permalink
add fix for cr labels handling
Browse files Browse the repository at this point in the history
  • Loading branch information
RoiGlinik committed Dec 19, 2024
1 parent 4c657aa commit 644d66e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions robusta_krr/core/integrations/kubernetes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,12 @@ def __build_scannable_object(
kind = kind or item.__class__.__name__[2:]

labels = {}
annotations = {}
if item.metadata.labels:
if type(item.metadata.labels) is ObjectLikeDict:
labels = item.metadata.labels.__dict__
else:
labels = item.metadata.labels

annotations = {}
if item.metadata.annotations:
if type(item.metadata.annotations) is ObjectLikeDict:
annotations = item.metadata.annotations.__dict__
Expand Down

0 comments on commit 644d66e

Please # to comment.