Skip to content

Commit

Permalink
Fix ArgoRollouts (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
aantn authored Jul 1, 2024
1 parent 9fda8be commit f71abd1
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ def _build_selector_query(cls, selector: Any) -> Union[str, None]:
if selector.match_labels is not None:
label_filters += [f"{label[0]}={label[1]}" for label in selector.match_labels.items()]

# normally the kubernetes API client renames matchLabels to match_labels in python
# but for CRDs like ArgoRollouts that renaming doesn't happen
if getattr(selector, "matchLabels", None):
label_filters += [f"{label[0]}={label[1]}" for label in getattr(selector, "matchLabels").items()]

if selector.match_expressions is not None:
label_filters += [cls._get_match_expression_filter(expression) for expression in selector.match_expressions]

Expand Down

0 comments on commit f71abd1

Please sign in to comment.