Merge pull request #26430 from Luap99/artifact-mount-name

artifact mount: improve single file behavior and add name option to specify a custom container name
This commit is contained in:
openshift-merge-bot[bot]
2025-06-16 13:51:43 +00:00
committed by GitHub
7 changed files with 86 additions and 18 deletions

View File

@ -32,17 +32,28 @@ Options specific to type=**artifact**:
- *title*: If the artifact source contains multiple blobs a title can be set
which is compared against `org.opencontainers.image.title` annotation.
- *name*: This can be used to overwrite the filename we use inside the container
for mounting. On a single blob artifact the name is used as is if *dst* is a
directory and otherwise ignored. With a multi blob artifact the name will be
used with an index suffix `<name>-x` where x is the layer index in the artifact
starting with 0.
The *src* argument contains the name of the artifact, which must already exist locally.
The *dst* argument contains the target path, if the path in the container is a
directory or does not exist the blob title (`org.opencontainers.image.title`
annotation) will be used as filename and joined to the path. If the annotation
does not exist the digest will be used as filename instead. This results in all blobs
of the artifact mounted into the container at the given path.
directory the blob title (`org.opencontainers.image.title` annotation) will be used as
filename and joined to the path. If the annotation does not exist the digest will be
used as filename instead. This results in all blobs of the artifact mounted into the
container at the given path.
However, if the *dst* path is an existing file in the container, then the blob will be
mounted directly on it. This only works when the artifact contains a single blob
or when either *digest* or *title* are specified.
If the *dst* path does not already exist in the container then if the artifact contains
a single blob it behaves like existing file case and mounts directly to that path.
If the artifact has more than one blob it works like the existing directory case and
mounts each blob as file within the *dst* path.
Options specific to type=**volume**:
- *ro*, *readonly*: *true* or *false* (default if unspecified: *false*).