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

Prepend user env vars #837

Closed
Closed
Changes from all commits
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
8 changes: 4 additions & 4 deletions dask_kubernetes/operator/controller/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ def build_worker_deployment_spec(
]
for i in range(len(deployment_spec["spec"]["template"]["spec"]["containers"])):
if "env" in deployment_spec["spec"]["template"]["spec"]["containers"][i]:
deployment_spec["spec"]["template"]["spec"]["containers"][i]["env"].extend(
env
)
deployment_spec["spec"]["template"]["spec"]["containers"][i]["env"][
:0
] = env
else:
deployment_spec["spec"]["template"]["spec"]["containers"][i]["env"] = env
return deployment_spec
Expand Down Expand Up @@ -197,7 +197,7 @@ def build_job_pod_spec(job_name, cluster_name, namespace, spec, annotations, lab
]
for i in range(len(pod_spec["spec"]["containers"])):
if "env" in pod_spec["spec"]["containers"][i]:
pod_spec["spec"]["containers"][i]["env"].extend(env)
pod_spec["spec"]["containers"][i]["env"][:0] = env
else:
pod_spec["spec"]["containers"][i]["env"] = env
return pod_spec
Expand Down
Loading