Skip to content

Commit

Permalink
Merge pull request #554 from GrahamDumpleton/lookup-service-selector-fix
Browse files Browse the repository at this point in the history
Fix match expressions bug in lookup service.
  • Loading branch information
GrahamDumpleton authored Aug 20, 2024
2 parents e087051 + 45fd96a commit ef3953d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions lookup-service/service/caches/tenants.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def allowed_access_to_portal(self, portal: TrainingPortal) -> bool:
resource = {
"metadata": {
"name": portal.name,
"uid": portal.uid,
"labels": {item["name"]: item["value"] for item in list(portal.labels)},
},
}
Expand Down
4 changes: 3 additions & 1 deletion lookup-service/service/helpers/selectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ def convert_to_label_selector(label_selector_dict: dict) -> LabelSelector:

match_expressions = [
LabelSelectorRequirement(
key=expr["key"], operator=expr["operator"], values=expr.get("values")
key=expr["key"],
operator=Operator(expr["operator"]),
values=expr.get("values"),
)
for expr in match_expressions_data
]
Expand Down

0 comments on commit ef3953d

Please sign in to comment.