@@ -274,6 +274,14 @@ Requires=basic.container
274
274
Image=registry.fedoraproject.org/fedora:41
275
275
```
276
276
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
+
277
285
## Container units [ Container]
278
286
279
287
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.
1138
1146
1139
1147
### ` PodName= `
1140
1148
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 .
1144
1152
1145
1153
Please note that pods and containers cannot have the same name.
1146
1154
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
1488
1496
1489
1497
### ` NetworkName= `
1490
1498
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.
1494
1503
1495
1504
### ` Options= `
1496
1505
@@ -1639,8 +1648,9 @@ The host (numeric) UID, or user name to use as the owner for the volume
1639
1648
1640
1649
### ` VolumeName= `
1641
1650
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
1644
1654
conflicts with user-managed volumes.
1645
1655
1646
1656
## Build units [ Build]
0 commit comments