Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ArgoRollouts #308

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading