Skip to content

Commit

Permalink
fix: k8s container volume mounts as list (#1868)
Browse files Browse the repository at this point in the history
As described in the body of PR
#1858, there's a typo whereby
the property `container.volume_mounts` is overwritten, rather than
appended to.

### QC

* [x] The PR contains a test case for the changes or the changes are
already covered by an existing test case. (this is allegedly tested as
part of the k8s tests).
* [ ] ~The documentation (`docs/`) is updated to reflect the changes or
this is not necessary (e.g. if the change does neither modify the
language nor the behavior or functionalities of Snakemake).~
  • Loading branch information
kdm9 committed Sep 23, 2022
1 parent d0de4dc commit 5c54df3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions snakemake/executors/__init__.py
Expand Up @@ -1853,10 +1853,8 @@ def run(self, job, callback=None, submit_callback=None, error_callback=None):
container.args = ["-c", exec_job]
container.working_dir = "/workdir"
container.volume_mounts = [
kubernetes.client.V1VolumeMount(name="workdir", mount_path="/workdir")
]
container.volume_mounts = [
kubernetes.client.V1VolumeMount(name="source", mount_path="/source")
kubernetes.client.V1VolumeMount(name="workdir", mount_path="/workdir"),
kubernetes.client.V1VolumeMount(name="source", mount_path="/source"),
]

node_selector = {}
Expand Down

0 comments on commit 5c54df3

Please sign in to comment.