Quadlet .pod - add support for the Volume Key

Add e2e tests
Update documentation

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
This commit is contained in:
Ygal Blum
2023-12-03 10:23:13 +02:00
parent 212b4c9e93
commit 7e2a8d58ab
4 changed files with 75 additions and 31 deletions

View File

@ -697,6 +697,7 @@ Valid options for `[Container]` are listed below:
| Network=host | --network host |
| PodmanArgs=\-\-cpus=2 | --cpus=2 |
| PodName=name | --name=name |
| Volume=/source:/dest | --volume /source:/dest |
Supported keys in the `[Pod]` section are:
@ -754,6 +755,20 @@ prefix to avoid conflicts with user-managed containers.
Please note that pods and containers cannot have the same name.
So, if PodName is set, it must not conflict with any container.
### `Volume=`
Mount a volume in the pod. This is equivalent to the Podman `--volume` option, and
generally has the form `[[SOURCE-VOLUME|HOST-DIR:]CONTAINER-DIR[:OPTIONS]]`.
If `SOURCE-VOLUME` starts with `.`, Quadlet resolves the path relative to the location of the unit file.
As a special case, if `SOURCE-VOLUME` ends with `.volume`, Quadlet will look for the corresponding `.volume` Quadlet unit.
If found, Quadlet will use the name of the Volume set in the Unit, otherwise, `systemd-$name` is used.
The generated systemd service contains a dependency on the service unit generated for that `.volume` unit,
or on `$name-volume.service` if the `.volume` unit is not found
This key can be listed multiple times.
## Kube units [Kube]
Kube units are named with a `.kube` extension and contain a `[Kube]` section describing