Skip to content

Commit 2824d76

Browse files
Remove old version
1 parent 410c68c commit 2824d76

File tree

8 files changed

+8
-57
lines changed

8 files changed

+8
-57
lines changed

--set

Whitespace-only changes.

Dockerfile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM ghcr.io/dask/dask-kubernetes-operator:2025.1.1
2+
3+
COPY dask_kubernetes .
4+
5+
USER root
6+
COPY requirements-test.txt .
7+
8+
RUN pip install -r requirements-test.txt

ci/install-deps.sh

100755100644
File mode changed.

ci/pre-commit-crd.py

100755100644
File mode changed.

dask_kubernetes/operator/controller/controller.py

-57
Original file line numberDiff line numberDiff line change
@@ -376,63 +376,6 @@ async def daskcluster_create_components(
376376

377377
patch.status["phase"] = "Pending"
378378

379-
380-
@kopf.on.update("daskcluster.kubernetes.dask.org")
381-
async def daskcluster_update(
382-
spec: kopf.Spec, status: kopf.Status, namespace: str | None, logger: kopf.Logger,path, meta: kopf.Meta, **__: Any
383-
):
384-
"""When the DaskCluster resource is updated update all the components."""
385-
assert namespace
386-
# Update scheduler deployment
387-
scheduler_deployment = await Deployment(
388-
SCHEDULER_NAME_TEMPLATE.format(cluster_name=status["clusterName"]), namespace=namespace
389-
)
390-
391-
scheduler_spec = spec.get("scheduler", {})
392-
annotations = _get_annotations(meta)
393-
labels = _get_labels(meta)
394-
if "metadata" in scheduler_spec:
395-
if "annotations" in scheduler_spec["metadata"]:
396-
annotations.update(**scheduler_spec["metadata"]["annotations"])
397-
if "labels" in scheduler_spec["metadata"]:
398-
labels.update(**scheduler_spec["metadata"]["labels"])
399-
400-
data = build_scheduler_deployment_spec(status["clusterName"], scheduler_spec.get("spec"), annotations, labels)
401-
if await scheduler_deployment.exists():
402-
await scheduler_deployment.patch(data)
403-
else:
404-
kopf.adopt(data)
405-
await scheduler_deployment.create()
406-
407-
# Update scheduler service
408-
scheduler_service = await Service(
409-
SCHEDULER_NAME_TEMPLATE.format(cluster_name=status["clusterName"]), namespace=namespace
410-
)
411-
data = build_scheduler_service_spec(status["clusterName"], scheduler_spec.get("service"), annotations, labels)
412-
if await scheduler_service.exists():
413-
await scheduler_service.patch(data)
414-
else:
415-
kopf.adopt(data)
416-
await scheduler_service.create()
417-
418-
# Update default worker group
419-
worker_group = await DaskWorkerGroup.get(f"{status['clusterName']}-default", namespace=namespace)
420-
worker_spec = spec.get("worker", {})
421-
annotations = _get_annotations(cluster.meta)
422-
labels = _get_labels(cluster.meta)
423-
if "metadata" in worker_spec:
424-
if "annotations" in worker_spec["metadata"]:
425-
annotations.update(**worker_spec["metadata"]["annotations"])
426-
if "labels" in worker_spec["metadata"]:
427-
labels.update(**worker_spec["metadata"]["labels"])
428-
429-
data = build_default_worker_group_spec(status["clusterName"], worker_spec, annotations, labels)
430-
if await worker_group.exists():
431-
await worker_group.patch(data)
432-
else:
433-
kopf.adopt(data)
434-
await worker_group.create()
435-
436379
@kopf.on.update("daskcluster.kubernetes.dask.org")
437380
async def daskcluster_update(
438381
spec: kopf.Spec,

dask_kubernetes/operator/go_client/hack/lint.sh

100755100644
File mode changed.

dask_kubernetes/operator/go_client/hack/regenerate-code.sh

100755100644
File mode changed.

docs/make.bat

100644100755
File mode changed.

0 commit comments

Comments
 (0)