Skip to content

Commit af30554

Browse files
committed
docs(package): describe snapshot view configuration
Document the snapshotView annotation in both the package overview and rootfs guide. Explain how to enable the feature from config.json or urunc.json and clarify that it is used together with mountRootfs on supported block-based snapshotters. Signed-off-by: sidneychang <2190206983@qq.com>
1 parent 789063e commit af30554

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

docs/package/index.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ Except of the above, `urunc` accepts the following optional annotations:
7272
- `com.urunc.unikernel.mountRootfs`: A boolean value that if it is `true`,
7373
requests from `urunc` to mount the container's image rootfs in the unikernel
7474
(either as a block device or through shared-fs).
75+
- `com.urunc.unikernel.snapshotView`: A boolean value that if it is `true`,
76+
enables the per-container snapshot-view feature. It is **not** stored in the
77+
OCI image at build time; it is supplied at container start as a runtime
78+
annotation. This feature is used only together with
79+
`com.urunc.unikernel.mountRootfs=true` and currently targets block-based
80+
snapshotters such as `devmapper` and `blockfile`.
7581

7682
Due to the fact that [Docker](https://www.docker.com/) and some high-level
7783
container runtimes do not pass the image annotations to the underlying container
@@ -80,6 +86,18 @@ container's rootfs. The file should be named `urunc.json`, it should be
8086
placed in the root directory of the container's rootfs and it should have a JSON
8187
format with the above information, where the values are base64 encoded.
8288

89+
The recommended way to enable the snapshot-view feature is through OCI runtime
90+
annotations at container start time:
91+
92+
- Add `com.urunc.unikernel.snapshotView=true` to the OCI runtime annotations in
93+
the container bundle's `config.json`. This does not require rebuilding the
94+
image and keeps snapshot-view opt-in per run.
95+
96+
At the moment `snapshotView` is consumed from the OCI runtime annotations in
97+
the bundle's `config.json`. The `mountRootfs` setting may still come from the
98+
bundle annotation, container metadata, or `urunc.json`, but `snapshotView`
99+
itself is expected to be passed at runtime.
100+
83101
## Tools to construct OCI images with `urunc`'s annotations
84102

85103
As previously mentioned we currently provide 2 different tools to build and

0 commit comments

Comments
 (0)