From bcad9aa54846005dd3f94a6b386c1bcbacade7e0 Mon Sep 17 00:00:00 2001 From: Johanna Goergen Date: Tue, 27 Feb 2024 11:21:52 +0100 Subject: [PATCH] Actually, stop removing the dask cluster automatically. It can be manually deleted. --- dask_kubernetes/operator/controller/controller.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/dask_kubernetes/operator/controller/controller.py b/dask_kubernetes/operator/controller/controller.py index 7d89ca6a..9c622224 100644 --- a/dask_kubernetes/operator/controller/controller.py +++ b/dask_kubernetes/operator/controller/controller.py @@ -289,7 +289,7 @@ async def daskcluster_create(name, namespace, logger, patch, **kwargs): logger.info(f"DaskCluster {name} created in {namespace}.") if not _validate_cluster_name(name): - patch.status["phase"] = "Failed" + patch.status["phase"] = "Error" raise kopf.PermanentError( f"The DaskCluster {name} is invalid: a lowercase RFC 1123 subdomain must " "consist of lower case alphanumeric characters, '-' or '.', and must start " @@ -355,12 +355,6 @@ async def daskcluster_create_components( patch.status["phase"] = "Pending" -@kopf.on.field("daskcluster.kubernetes.dask.org", field="status.phase", new="Failed") -async def daskcluster_delete(spec, name, namespace, logger, patch, meta, **kwargs): - cluster = await DaskCluster.get(name, namespace=namespace) - await cluster.delete() - - @kopf.on.field("service", field="status", labels={"dask.org/component": "scheduler"}) async def handle_scheduler_service_status( spec, labels, status, namespace, logger, **kwargs