Skip to content
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
21 changes: 13 additions & 8 deletions src/mas/devops/ocp.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,19 @@ def waitForCRD(dynClient: DynamicClient, crdName: str) -> bool:
try:
crd = crdAPI.get(name=crdName)
conditions = crd.status.conditions
for condition in conditions:
if condition.type == "Established":
if condition.status == "True":
foundReadyCRD = True
else:
logger.debug(f"Waiting 5s for {crdName} CRD to be ready before checking again ...")
sleep(5)
continue
if conditions is None:
logger.debug(f"Looking for status.conditions to be available to iterate for {crdName}")
sleep(5)
continue
else:
for condition in conditions:
if condition.type == "Established":
if condition.status == "True":
foundReadyCRD = True
else:
logger.debug(f"Waiting 5s for {crdName} CRD to be ready before checking again ...")
sleep(5)
continue
except NotFoundError:
logger.debug(f"Waiting 5s for {crdName} CRD to be installed before checking again ...")
sleep(5)
Expand Down