Skip to content

Commit 700c679

Browse files
committed
Quadlet - Update the docs to reflect the default naming of resources
Signed-off-by: Ygal Blum <[email protected]>
1 parent 09d9d3e commit 700c679

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

docs/source/markdown/podman-systemd.unit.5.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,14 @@ Requires=basic.container
274274
Image=registry.fedoraproject.org/fedora:41
275275
```
276276

277+
### Setting resource names
278+
279+
Quadlet units allow setting the names of the created resources
280+
(e.g. `VolumeName` for `.volume` units or `PodName` for `.pod` units).
281+
282+
Note that using systemd specifiers that reference the generated service unit (e.g. `$N`)
283+
breaks Quadlet's ability to link between resources as they are translated differently in each service
284+
277285
## Container units [Container]
278286

279287
Container units are named with a `.container` extension and contain a `[Container]` section describing
@@ -1138,9 +1146,9 @@ This key can be listed multiple times.
11381146

11391147
### `PodName=`
11401148

1141-
The (optional) name of the Podman pod. If this is not specified, the default value
1142-
of `systemd-%N` is used, which is the same as the service name but with a `systemd-`
1143-
prefix to avoid conflicts with user-managed containers.
1149+
The (optional) name of the Podman pod.
1150+
If this is not specified, the default value is the same name as the unit, but with a `systemd-` prefix,
1151+
i.e. a `$name.pod` file creates a `systemd-$name` Podman pod to avoid conflicts with user-managed pods.
11441152

11451153
Please note that pods and containers cannot have the same name.
11461154
So, if PodName is set, it must not conflict with any container.
@@ -1488,9 +1496,10 @@ When set to `true` the network is deleted when the service is stopped
14881496

14891497
### `NetworkName=`
14901498

1491-
The (optional) name of the Podman network. If this is not specified, the default value of
1492-
`systemd-%N` is used, which is the same as the unit name but with a `systemd-` prefix to avoid
1493-
conflicts with user-managed networks.
1499+
The (optional) name of the Podman network.
1500+
If this is not specified, the default value is the same name as the unit, but with a `systemd-` prefix,
1501+
i.e. a `$name.network` file creates a `systemd-$name` Podman network to avoid
1502+
conflicts with user-managed network.
14941503

14951504
### `Options=`
14961505

@@ -1639,8 +1648,9 @@ The host (numeric) UID, or user name to use as the owner for the volume
16391648

16401649
### `VolumeName=`
16411650

1642-
The (optional) name of the Podman volume. If this is not specified, the default value of
1643-
`systemd-%N` is used, which is the same as the unit name but with a `systemd-` prefix to avoid
1651+
The (optional) name of the Podman volume.
1652+
If this is not specified, the default value is the same name as the unit, but with a `systemd-` prefix,
1653+
i.e. a `$name.volume` file creates a `systemd-$name` Podman volume to avoid
16441654
conflicts with user-managed volumes.
16451655

16461656
## Build units [Build]

0 commit comments

Comments
 (0)