Skip to content
This repository was archived by the owner on Jul 18, 2023. It is now read-only.

Commit d73291f

Browse files
committed
Repo listing examples
1 parent 0e2c607 commit d73291f

File tree

5 files changed

+45
-10
lines changed

5 files changed

+45
-10
lines changed

artifact-manifest/artifact-manifest.md

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
# OCI Artifact Manifest
22

3-
The OCI artifact manifest provides a means to define a wide range of artifacts, including a chain of dependencies of related artifacts. It provides a means to define multiple collections of types, including blobs, dependent artifacts and referenced artifacts. These collections provide the information required for validating an artifact and registry management including reference counting, garbage collection and indexing.
3+
The OCI artifact manifest provides a means to define a wide range of artifacts, including a chain of dependencies of related artifacts. It provides a means to define multiple collections of types, including blobs, dependent artifacts and referenced artifacts.
4+
5+
These collections provide the information required for:
6+
7+
- validating an artifact,
8+
- registry management and visualizations
9+
- deletion management, including reference counting, garbage collection &
10+
- indexing for artifact discover, along with it's related content
11+
- copying within & across registries
412

513
OCI Artifact Manifests provide the following types of references:
614

7-
1. Content that represents the artifact, persisted as blobs. These are analogues to layers from the OCI Image manifest and Config objects. Layers are renamed blobs as they represent a generic collection of content, as opposed to an ordered layered collection as defined by OCI Image Manifest. An artifact may treat them as ordered, but it is not required.
8-
1. Loose references to other artifacts, used to complete a scenario, but may not be stored within the same repository or registry. These references are defined by the source artifact and known at the time of upload to a registry, such as a Helm chart that references other images. These references are included in the manifest and computed in the digest of the manifest.
9-
1. References made by enhancements to the artifact, such as a Notary v2 signature or an SBoM. These references are unknown by the original artifact as they are added at a later time. A registry would need to index these references as registry apis would request all content related to the source artifact.
15+
1. **Blobs:** Content that represents the artifact. These are analogues to layers from the OCI Image manifest and Config objects. Layers are renamed blobs as they represent a generic collection of content, as opposed to an ordered layered collection as defined by OCI Image Manifest. An artifact may treat them as ordered, but it is not required.
16+
1. **References** to other artifacts, used to complete a scenario, but may not be stored within the same repository or registry. These references are defined by the source artifact and known at the time of upload to a registry, such as a Helm chart that references other images. These references are included in the manifest and computed in the digest of the manifest.
17+
1. **Dependencies** on other artifacts that enhance the content, such as a Notary v2 signature or an SBoM. These dependencies are *unknown* by the original artifact as they are added at a later time. A registry would need to index these references as registry apis would request all content related to the source artifact.
1018

1119
## Supported Artifact Types
1220

13-
Artifact Manifest is intended to support the following scenarios:
21+
Artifact manifest is intended to support the following artifact types:
1422

1523
### OCI Image
1624

@@ -20,26 +28,50 @@ An OCI Image is based on the oci-image-manifest. It's shown as a comparison to t
2028

2129
### Notary v2 Signature Persistance
2230

23-
A Notary v2 signature would persist as a manifest with a config object and a signature, persisted as a blobs.
31+
A Notary v2 signature would persist as a manifest with a config object and a signature, persisted as a blob. However, the signature has no value unto itself. A signature is applied to a given artifact. It's said to be dependent upon another artifact to be complete.
2432

2533
![notary v2 signature](media/notaryv2-signature.svg)
2634

27-
The Notary v2 signature would reference an artifact, such as the `wordpress:v5` image above. Notice the directionality of the references. One or more signatures may be added to a registry after the image was persisted. While an image knows of it's layers, and a Notary v2 signature knows of its config and blob, the Notary v2 signature has a reference to the artifact its signing.
35+
The Notary v2 signature would reference an artifact, such as the `wordpress:v5` image above. Notice the directionality of the references. One or more signatures may be added to a registry after the image was persisted. While an image knows of it's layers, and a Notary v2 signature knows of its config and blob, the Notary v2 signature declares a dependency to the artifact it's signing. The visualization indicates the references through solid lines as these reference types are said to be hard references. Just as the layers of an OCI Image are deleted (*ref-counted -1*), the blobs of a signature are deleted (*ref-counted -1*) when the signature is deleted. Likewise, when an artifact is deleted, the signature would be deleted (*ref-counted -1*) as the signatures have no value without the artifact they are signing.
2836

2937
![wordpress image with layers](media/wordpress-image-layers-sig.svg)
3038

3139
### Helm Charts & CNAB
3240

33-
A Helm chart can represent the images it references within the chart. These references are loose references as they may be persisted in different registries, or may change as a values file is updated. However, the chart may also be persisted together as a collection of artifacts in a registry.
41+
A Helm chart can represent the images it references within the chart. These references are loose references as they may be persisted in different registries, or may change as a values file is updated. However, the chart may also be persisted together as a collection of artifacts in a registry. The lines are dotted to represent the loose reference. Deleting the `wordpress-chart:v5` may, or may not delete the images as the images have value unto themselves.
3442

3543
![Wordpress Helm Chart](media/wordpress-helm-chart.svg)
3644

37-
A CNAB may also be persisted as a CNAB document that contains the configuration information, along with its invocation image. Notice the reference to the `helm-cli:v3` is a hard reference. This allows the helm-cli to be deleted *(ref-count -1)* when the parent cnab is deleted. As the CNAB references a Helm chart, the `wordpress-chart:v5` is also represented as a loose reference, which then references the images required to instance wordpress.
45+
A CNAB may also be persisted with configuration information, along with a reference to its invocation image. The reference to the `helm-cli:v3` is solid line/hard reference. This allows the helm-cli to be deleted *(ref-count -1)* when the parent cnab is deleted. As the CNAB references a Helm chart, the `wordpress-chart:v5` is also represented as a loose reference as the helm chart and referenced images have value unto themselves.
3846

3947
![Wordpress CNAB](media/wordpress-cnab.svg)
4048

4149
## Supported Scenarios
4250

51+
The main scenarios include:
52+
53+
1. Discovery of content within a registry for content listing through CLI and visualizations.
54+
1. Copying within and across registries.
55+
1. Deletion management, providing information to de-dupe content with reference counting.
56+
1. Support enhancing information related to existing content. Such as adding a Notary v2 signature or SBoM.
57+
1. Validation, with required and optional references.
58+
59+
### Content Discovery
60+
61+
Registries today support a flat list of content within designated repositories. A container image, multi-arch container image, Helm Chart, CNAB, Singularity, WASM and other OCI Artifact types can be listed based on their `manifest.config.mediaType`
62+
63+
![flat listing of OCI artifacts](media/repo-listing-flat.svg)
64+
65+
In the above example, all the artifacts are displayed without relation to each other. The layers of the `:v5` are also displayed as an example of data that is already hidden.
66+
67+
![flat listing of OCI artifacts](media/repo-listing-attributed.svg)
68+
69+
In the above example, the Notary v2 signature, an SBoM and collection of attributes are displayed as directly associated with their primary artifact.
70+
71+
![flat listing of OCI artifacts](media/repo-listing-attributed-expanded.svg)
72+
73+
In the above case, the graph of references can be expanded showing the references across repositories. This visualization demonstrates the hierarchy known by the registry, based on the artifact-manifest. While an artifact icon is displayed, based on the `manifest.config.mediaType`, the registry need not know any of the artifact specific details to track this data. Registries would not need to parse the Helm Chart, the CNAB. Each artifact author will lift data elements for the objects they wish to reference in a registry.
74+
4375
### Copy Container Images
4476

4577
![mysql image copy](media/mysql-copy.svg)

artifact-manifest/media/repo-listing-attributed-expanded.svg

Lines changed: 1 addition & 0 deletions
Loading

artifact-manifest/media/repo-listing-attributed.svg

Lines changed: 1 addition & 0 deletions
Loading

artifact-manifest/media/repo-listing-flat.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)