Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot define additional containers using make_pod_spec and extra_pod_config #527

Closed
isaacbrodsky opened this issue Jun 10, 2022 · 3 comments

Comments

@isaacbrodsky
Copy link

isaacbrodsky commented Jun 10, 2022

Using make_pod_spec, it is not possible to add additional containers correctly.

In [43]: type(make_pod_spec('testimage').spec.containers[0])
Out[43]: kubernetes.client.models.v1_container.V1Container

In [44]: type(make_pod_spec('testimage', extra_pod_config={"containers":[{"name":"test"}]}).spec.containers[0])
Out[44]: dict

In [45]: type(make_pod_spec('testimage', extra_pod_config={"containers":[{"name":"test"}]}).spec.containers[1])
Out[45]: dict

Expected: type should be kubernetes.client.models.v1_container.V1Container

The type needs to be preserved because

if pod_template.spec.containers[0].env is None:
requires that it be V1Container, not dict. Or, that line needs to be changed to accept dict.

Edit: Note: I tested on 2021.10.0, apologies if this is not applicable to master, but it looks like it is.
Edit2: If you do work around this, then #320 applies.

@jacobtomlinson
Copy link
Member

Thanks for raising this. Do you have interest in opening a PR to resolve this?

@isaacbrodsky
Copy link
Author

Not immediately, I have a workaround where I modify the worker pod spec after calling this function.

@jacobtomlinson
Copy link
Member

The classic KubeCluster was removed in #890. All users will need to migrate to the Dask Operator. Closing.

@jacobtomlinson jacobtomlinson closed this as not planned Won't fix, can't repro, duplicate, stale Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants