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 25de78b commit 0174f4d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions performance_measurement/measure_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,19 +345,23 @@ def wait_for_reference_zk_spec(

desired_toleration = input["spec"]["pod"]["tolerations"] if "pod" in input["spec"] and "tolerations" in input["spec"]["pod"] else None
if not check_tolerations(desired_toleration, sts_object):
logging.info("toleration not matched")
continue

# check if annotations match
input_annotations = input["spec"]["annotations"] if "pod" in input["spec"] and "annotations" in input["spec"]["pod"] else None
if not check_annotations(input_annotations, sts_object):
logging.info("annotation not matched")
continue

# check if labels match
input_labels = input["spec"]["labels"] if "pod" in input["spec"] and "labels" in input["spec"]["pod"] else None
if not check_labels(input_labels, sts_object):
logging.info("label not matched")
continue

if sts_object["metadata"]["generation"] != sts_object["status"]["observed_generation"]:
logging.info("generation not matched")
continue

break
Expand Down Expand Up @@ -436,24 +440,29 @@ def wait_for_zk_spec(
# check if resources match
desired_resources = input["spec"]["resources"] if "resources" in input["spec"] else None
if not check_resources(desired_resources, sts_object):
logging.info("resource not matched")
continue

# check if annotations match
input_annotations = input["spec"]["annotations"] if "annotations" in input["spec"] else None
if not check_annotations(input_annotations, sts_object):
logging.info("annotation not matched")
continue

# check if labels match
input_labels = input["spec"]["labels"] if "labels" in input["spec"] else None
if not check_labels(input_labels, sts_object):
logging.info("label not matched")
continue

desired_toleration = input["spec"]["tolerations"] if "tolerations" in input["spec"] else None
if not check_tolerations(desired_toleration, sts_object):
logging.info("toleration not matched")
continue

# make sure the generation is up to date
if sts_object["metadata"]["generation"] != sts_object["status"]["observed_generation"]:
logging.info("generation not matched")
continue

configmap: k8s_models.V1ConfigMap = coreV1Api.read_namespaced_config_map(
Expand Down

0 comments on commit 0174f4d

Please sign in to comment.