Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion dask_kubernetes/operator/kubecluster/kubecluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,12 @@ def from_name(cls, name, **kwargs):
--------
>>> cluster = KubeCluster.from_name(name="simple-cluster")
"""
return cls(name=name, create_mode=CreateMode.CONNECT_ONLY, **kwargs)
return cls(
name=name,
create_mode=CreateMode.CONNECT_ONLY,
shutdown_on_close=False,
**kwargs,
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pseudo code and probably wont pass linting. But we could use the dict pipe merge now that 3.9 is our minimum!

Suggested change
return cls(
name=name,
create_mode=CreateMode.CONNECT_ONLY,
shutdown_on_close=False,
**kwargs,
)
defaults = {"create_mode": CreateMode.CONNECT_ONLY, "shutdown_on_close": False}
kwargs = defaults | kwargs
return cls(
name=name,
**kwargs,
)



def make_cluster_spec(
Expand Down