Skip to content

Commit

Permalink
Actually, stop removing the dask cluster automatically. It can be man…
Browse files Browse the repository at this point in the history
…ually deleted.
  • Loading branch information
Johanna Goergen committed Feb 27, 2024
1 parent 850aaa6 commit bcad9aa
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions dask_kubernetes/operator/controller/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bcad9aa

Please sign in to comment.