Quadlet - explicit support for read-only-tmpfs

Add Quadlet key and disconnect relationship withr read-only
Update and add tests
Update man with new key

Remove the reference to VolatileTmpfs in the man page to reduce its
usage, since the same functionality can be achieved using the Tmpfs key
while keeping its support to maintain backward compatibility

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
This commit is contained in:
Ygal Blum
2023-10-25 09:28:16 +03:00
parent 242d223196
commit 76cca08f8a
8 changed files with 37 additions and 20 deletions

View File

@@ -4,4 +4,4 @@
[Container]
Image=localhost/imagename
ReadOnly=yes
VolatileTmp=no
ReadOnlyTmpfs=no

View File

@@ -0,0 +1,7 @@
## assert-podman-args "--read-only-tmpfs"
## assert-podman-args "--read-only"
[Container]
Image=localhost/imagename
ReadOnly=yes
ReadOnlyTmpfs=yes

View File

@@ -0,0 +1,6 @@
## !assert-podman-args "--read-only-tmpfs"
## assert-podman-args "--read-only"
[Container]
Image=localhost/imagename
ReadOnly=yes

View File

@@ -0,0 +1,6 @@
## !assert-podman-args "--tmpfs" "/tmp:rw,size=512M,mode=1777"
[Container]
Image=localhost/imagename
VolatileTmp=yes
ReadOnly=yes

View File

@@ -1,8 +1,5 @@
## !assert-podman-args "--read-only"
## assert-podman-args "--read-only=false"
## assert-podman-args "--tmpfs" "/tmp:rw,size=512M,mode=1777"
[Container]
Image=localhost/imagename
VolatileTmp=yes
ReadOnly=no

View File

@@ -709,9 +709,12 @@ BOGUS=foo
Entry("ports.container", "ports.container", 0, ""),
Entry("ports_ipv6.container", "ports_ipv6.container", 0, ""),
Entry("pull.container", "pull.container", 0, ""),
Entry("readonly.container", "readonly.container", 0, ""),
Entry("readonly-tmpfs.container", "readonly-tmpfs.container", 0, ""),
Entry("readonly-notmpfs.container", "readonly-notmpfs.container", 0, ""),
Entry("readwrite-notmpfs.container", "readwrite-notmpfs.container", 0, ""),
Entry("readwrite.container", "readwrite.container", 0, ""),
Entry("volatiletmp-readwrite.container", "volatiletmp-readwrite.container", 0, ""),
Entry("volatiletmp-readonly.container", "volatiletmp-readonly.container", 0, ""),
Entry("remap-auto.container", "remap-auto.container", 0, ""),
Entry("remap-auto2.container", "remap-auto2.container", 0, ""),
Entry("remap-keep-id.container", "remap-keep-id.container", 0, ""),