garden
garden copied to clipboard
Task runs do not copy volumeMounts
Bug
I've got a helm module with some tasks in it. The service resource is a deployment that is part of the chart. The pod spec in that deployment mounts a couple of volumes, one from a secret and another from a ConfigMap, which are configuration files that are read by the primary container.
Tasks spin up a new pod, but unfortunately do not seem to copy over the volumeMounts
and volumes
referenced by the primary container in the deployment.
I'm stuck because afaict there's no way to specify the same secret + ConfigMap based volumes in the task definitions. And even if it were possible, I probably would not want to duplicate this configuration in the task definitions - ideally they'd be copied over from the deployment.
I suspect tests have the same issue, but have not tried them to confirm.
Expected Behavior
Task runs create pods with the same volumes and volume mounts as the ones defined in the service resource.
Or maybe instead of creating new pods, the tasks can just exec within the existing pods.
Workaround
Run kubectl exec
instead of using garden tasks (and maybe tests) :(
Your environment
▶ garden --version
0.11.9
This issue has been automatically marked as stale because it hasn't had any activity in 60 days. It will be closed in 14 days if no further activity occurs (e.g. changing labels, comments, commits, etc.). Please feel free to tag a maintainer and ask them to remove the label if you think it doesn't apply. Thank you for submitting this issue and helping make Garden a better product!
This issue has been automatically marked as stale because it hasn't had any activity in 60 days. It will be closed in 14 days if no further activity occurs (e.g. changing labels, comments, commits, etc.). Please feel free to tag a maintainer and ask them to remove the label if you think it doesn't apply. Thank you for submitting this issue and helping make Garden a better product!
This issue has been automatically marked as stale because it hasn't had any activity in 60 days. It will be closed in 14 days if no further activity occurs (e.g. changing labels, comments, commits, etc.). Please feel free to tag a maintainer and ask them to remove the label if you think it doesn't apply. Thank you for submitting this issue and helping make Garden a better product!
This is still an issue as of garden version 0.12.20.
Hi @jamesgregorystewart
Thanks for pointing this out. This one has kind of slipped through the cracks. We'll look into this.
This would be helpful for us, too.
I've bumped priority as Tasks should be respecting volumeMounts
by design according to our reference docs where we specify the volumes
field is used (volumes must be paired with volumeMounts). This bug is also very old and bound to surface again (it bit me today) without a little Garden love 💕
Still happening as of version 0.12.50 with garden test
.
This issue, plus the fact of running tests in their own new pod, makes garden test
unusable in our case.
I would appreciate this getting more attention!
This is fixed in 0.13 with both modules and actions.