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

Inject nydus annotation in manifest #1255

Open
hyy0322 opened this issue Apr 28, 2023 · 4 comments
Open

Inject nydus annotation in manifest #1255

hyy0322 opened this issue Apr 28, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@hyy0322
Copy link

hyy0322 commented Apr 28, 2023

Currently, Nydus Image label is in layers[n].annotations. In this format, harbor can not extract data. Annotation in manifest scope can be extracted. Here is an example.

{
    "schemaVersion":2,
    "mediaType":"application/vnd.docker.distribution.manifest.v2+json",
    "config":{
        "mediaType":"application/vnd.docker.container.image.v1+json",
        "digest":"sha256:a4e8c023d6c588e559e97ea11d6019d4672d5c03f1278501ce69b7434f9e7cf6",
        "size":6965
    },
    "layers":[
        {
            "mediaType":"application/vnd.oci.image.layer.nydus.blob.v1",
            "digest":"sha256:33a3351194b06f896afbed833460e70ba13f8f365dd8c328fa7778e2b5123e63",
            "size":33853195,
            "annotations":{
                "containerd.io/snapshot/nydus-blob":"true"
            }
        },
        {
            "mediaType":"application/vnd.oci.image.layer.nydus.blob.v1",
            "digest":"sha256:254d6736795e373f9827f8c6c3d2e87256b4caab78ce1587066d1319214c537b",
            "size":25306316,
            "annotations":{
                "containerd.io/snapshot/nydus-blob":"true"
            }
        },
        {
            "mediaType":"application/vnd.oci.image.layer.nydus.blob.v1",
            "digest":"sha256:15d807bafd0cb7129868b65a2015e1c9bd362fabac3f61f7027883cfe92808c9",
            "size":10311,
            "annotations":{
                "containerd.io/snapshot/nydus-blob":"true"
            }
        },
        {
            "mediaType":"application/vnd.oci.image.layer.nydus.blob.v1",
            "digest":"sha256:d69d045ec1638270c3535a6ab5b3b61c87cc283900614c9d781311b250fb63c4",
            "size":10747,
            "annotations":{
                "containerd.io/snapshot/nydus-blob":"true"
            }
        },
        {
            "mediaType":"application/vnd.oci.image.layer.nydus.blob.v1",
            "digest":"sha256:7184d286ddd035acd1f7d168bc0abe58d4c56c3b9dee0fa0c36a42605b88b498",
            "size":10554,
            "annotations":{
                "containerd.io/snapshot/nydus-blob":"true"
            }
        },
        {
            "mediaType":"application/vnd.oci.image.layer.nydus.blob.v1",
            "digest":"sha256:5eb438a98d738d42b95500ea1bd50a4508e7040057457ba6816945ed1744cb0d",
            "size":11234,
            "annotations":{
                "containerd.io/snapshot/nydus-blob":"true"
            }
        },
        {
            "mediaType":"application/vnd.docker.image.rootfs.diff.tar.gzip",
            "digest":"sha256:17a4bc16736f6c40ce67a228d8174a7cd454a4c23ddd75b7981698f5e8c236f0",
            "size":523604,
            "annotations":{
                "containerd.io/snapshot/nydus-bootstrap":"true",
                "containerd.io/snapshot/nydus-fs-version":"5"
            }
        }
    ],
    "subject":{
        "mediaType":"application/vnd.docker.distribution.manifest.v2+json",
        "digest":"sha256:f2fee5c7194cbbfb9d2711fa5de094c797a42a51aa42b0c8ee8ca31547c872b1",
        "size":1570
    },
  "annotations": {
    "com.example.key1": "value1",
    "com.example.key2": "value2"
  }
}
@imeoer
Copy link
Collaborator

imeoer commented Apr 28, 2023

Do we need to attach other annotations besides identifying it as a nydus image?

@hyy0322
Copy link
Author

hyy0322 commented May 17, 2023

Do we need to attach other annotations besides identifying it as a nydus image?

Currently, No.

@hyy0322
Copy link
Author

hyy0322 commented May 22, 2023

I will follow this issue

@hyy0322
Copy link
Author

hyy0322 commented May 22, 2023

Disscussed with @imeoer ,we define annotation "containerd.io/snapshot/nydus": "true".

@adamqqqplay adamqqqplay added the enhancement New feature or request label Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants