-
-
Notifications
You must be signed in to change notification settings - Fork 155
Closed as not planned
Closed as not planned
Copy link
Description
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
dask-kubernetes/dask_kubernetes/objects.py
Line 207 in f67c58b
if pod_template.spec.containers[0].env is None: |
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.