Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Gu <[email protected]>
  • Loading branch information
tylergu committed Nov 13, 2023
1 parent f738e09 commit 6dbd591
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions performance_measurement/check_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ def check_tolerations(
desired_tolerations: List[dict],
sts_object: k8s_models.V1StatefulSet) -> bool:
# check if tolerations match
if desired_tolerations is None:
return sts_object["spec"]["template"]["spec"]["tolerations"] is None
if desired_tolerations is None or len(desired_tolerations) == 0:
return sts_object["spec"]["template"]["spec"]["tolerations"] is None or len(
sts_object["spec"]["template"]["spec"]["tolerations"]) == 0
toleration_matched = True
for toleration in desired_tolerations:
if sts_object["spec"]["template"]["spec"]["tolerations"] is None:
Expand Down

0 comments on commit 6dbd591

Please sign in to comment.