diff --git a/src/mas/devops/mas.py b/src/mas/devops/mas.py index 5dd6f38b..549f1be2 100644 --- a/src/mas/devops/mas.py +++ b/src/mas/devops/mas.py @@ -15,7 +15,7 @@ from types import SimpleNamespace from kubernetes.dynamic.resource import ResourceInstance from openshift.dynamic import DynamicClient -from openshift.dynamic.exceptions import NotFoundError, UnauthorizedError +from openshift.dynamic.exceptions import NotFoundError, ResourceNotFoundError, UnauthorizedError from jinja2 import Environment, FileSystemLoader from .ocp import getStorageClasses @@ -137,6 +137,9 @@ def verifyMasInstance(dynClient: DynamicClient, instanceId: str) -> bool: return True except NotFoundError: return False + except ResourceNotFoundError: + # The MAS Suite CRD has not even been installed in the cluster + return False except UnauthorizedError: logger.error("Error: Unable to verify MAS instance due to failed authorization: {e}") return False