Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

converter: support appending files to bootstrap layer #591

Merged
merged 2 commits into from
Apr 26, 2024

Conversation

imeoer
Copy link
Collaborator

@imeoer imeoer commented Apr 25, 2024

Support AppendFiles option on converter.Merge method,
AppendFiles specifies the files that need to be appended
to the bootstrap layer.

This option allows the user to place some files in the nydus
bootstrap layer, for example, the user can place metadata
info generated at build time, e.g. named image/metadata.json.

And this usage does not affect the image/image.boot bootstrap
file that is accessed by the nydus runtime.

@imeoer imeoer force-pushed the converter-bootstrap-append branch from 38134c1 to d5bcec0 Compare April 25, 2024 07:15
Support `AppendFiles` option on `converter.Merge` method,
`AppendFiles` specifies the files that need to be appended
to the bootstrap layer.

This option allows the user to place some files in the nydus
bootstrap layer, for example, the user can place metadata
info generated at build time, e.g. named `image/metadata.json`.

And this usage does not affect the `image/image.boot` bootstrap
file that is accessed by the nydus runtime.

Signed-off-by: Yan Song <yansong.ys@antgroup.com>
@imeoer imeoer force-pushed the converter-bootstrap-append branch from d5bcec0 to 52145e6 Compare April 25, 2024 07:21
Fix the clippy check errors like:

```
warning: field `0` is never read
  --> src/main.rs:79:8
   |
79 |     IO(io::Error),
   |     -- ^^^^^^^^^
   |     |
   |     field in this variant
   |
   = note: `#[warn(dead_code)]` on by default
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
   |
79 |     IO(()),
   |        ~~
```

Signed-off-by: Yan Song <yansong.ys@antgroup.com>
@imeoer imeoer requested review from changweige and sctb512 and removed request for changweige April 25, 2024 12:33
@sctb512
Copy link
Member

sctb512 commented Apr 25, 2024

LGTM.

Is there any example for this PR?

Copy link
Contributor

@adamqqqplay adamqqqplay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks!

It would be better if you could provide some docs.

@imeoer
Copy link
Collaborator Author

imeoer commented Apr 26, 2024

LGTM.

Is there any example for this PR?

Haven't yet, will submit in another PR, thanks!

@imeoer imeoer merged commit ce4848e into containerd:main Apr 26, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants