diff --git a/src/_nebari/upgrade.py b/src/_nebari/upgrade.py index 237f080eea..f464ad9dec 100644 --- a/src/_nebari/upgrade.py +++ b/src/_nebari/upgrade.py @@ -677,7 +677,9 @@ def _version_specific_upgrade( name=crd, ) except kubernetes.client.exceptions.ApiException as e: - if e.status != 404: + if e.status == 404: + rich.print(f"CRD [yellow]{crd}[/yellow] not found. Ignoring.") + else: raise e namespace = config.get("namespace", "default") @@ -689,7 +691,11 @@ def _version_specific_upgrade( namespace, ) except kubernetes.client.exceptions.ApiException as e: - if e.status != 404: + if e.status == 404: + rich.print( + f"Service account [yellow]{sa}[/yellow] not found. Ignoring." + ) + else: raise e else: kubectl_delete_argo_crds_cmd = " ".join(