-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[Feature]: Quadlet support for relative paths for Volume source #17418
Comments
@ygalblum: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
SGTM |
A friendly reminder that this issue had no activity for 30 days. |
@ygalblum Did you try relative paths which begin with ./ or ../? |
Following your comment I just did.
which produces the
Starting the service fails:
This is not a surprise since the base directory is not what the user intended it to be. For example, for user services the base directory if In addition, since Quadlet looks for Having said that, once I created the directory |
Podman does not support creating source volumes, we differ from Docker here. |
We could make quadlet smarter and add $PWD to the front of all relative paths and then resolve it to a real path. |
RequireForMount is a systemd unit key word: https://www.freedesktop.org/software/systemd/man/systemd.unit.html#RequiresMountsFor= Adding PWD will not solve the issue because it is implicitly inferred anyhow by Podman to the execution directory (for user its As I pointed in my initial comment, relative path will have to start with |
Agreed |
Feature request description
Currently, the
Volume
key in the QuadletContainer
group is equivalent to the-v
parameter ofpodman run
with one exception of depending on Quadlet based volumes (via.volume
files).As a result, the source (if provided) is interpreted the following way:
/
, it is an absolute path to a directory on the HostThe request is to support relative paths. Quadlet should then translate them based on the location of the location of the
.container
file, similar to the way it handles theEnvironmentFile
key.Suggest potential solution
Unlike other path cases, for
Volume
there is already a meaning for a source value that does not start with/
. So, to support it, Quadlet will have to require that the relative path starts with a.
Have you considered any alternatives?
No response
Additional context
I'm opening this ticket to continue the discussion in comment: #17177 (comment)
/label quadlet
The text was updated successfully, but these errors were encountered: