From e0d4b00159afe6fe006a3c8f8475be2034737047 Mon Sep 17 00:00:00 2001 From: Sajay Antony Date: Sat, 5 Aug 2023 01:12:17 +0000 Subject: [PATCH] PR feedback Signed-off-by: Sajay Antony --- docs/concepts/artifact.mdx | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/docs/concepts/artifact.mdx b/docs/concepts/artifact.mdx index 86138108..7bfcbc88 100644 --- a/docs/concepts/artifact.mdx +++ b/docs/concepts/artifact.mdx @@ -166,9 +166,9 @@ allowing the bundling of various OCI artifacts. An example use case if is when y multiple SBOMs of different architectures under one unified artifact. The Image Index is a higher-level construct in the OCI Image Specification that can point to -multiple Image Manifests, each suitable for a different platform or architecture. It helps to -group related artifacts together, providing a single entry-point for accessing any specific -artifact depending on the required architecture. +multiple Image Manifests, each suitable for a different platform or architecture or filtered by annotation. +It helps to group related artifacts together, providing a single entry-point for accessing any specific +artifact depending on the required condition. Below is an example of an OCI Image Index for an artifact that represents multiple SBOMs of different architectures: @@ -204,20 +204,18 @@ of different architectures: ## Best Practices and Limitations -While working with OCI artifacts, keep in mind that not all registries have implemented -image-spec v1.1. For backward compatibility, OCI artifacts can use the `config.mediaType` -to represent the artifact type, aligning with the IANA mediaType of the artifact. +While working with OCI artifacts, keep in mind that not all client tools or registries +have implemented support for the v1.1 version of the OCI image or distribution specifications. -In cases where the creation of an artifact doesn't involve a config blob, make sure to use -the `artifactType` field in the manifest. If a config blob is indispensable, comply with -the image specification and employ an empty one. As a rule of thumb, keep the manifest -size manageable by avoiding excessive annotations and leveraging blobs for larger data chunks. +- For maximum portability, use the `config.mediaType` property to declare the type of the artifact when clients or registries don't support the `artifactType` property. +- When clients or registries do support the `artifactType`, the `config.mediaType` can be set to "application/vnd.oci.empty.v1+json" if the artifact doesn't have a config blob. +- As a rule of thumb, keep the manifest size manageable by avoiding excessive annotations and leveraging blobs for larger data chunks. ## The Road Ahead The evolution of OCI artifacts is a journey in progress. While the current specification does not permit an empty config blob, it's plausible that future updates might -make layers and blobs optional—bringing more flexibility to the table. +make config and blobs optional eliminating the need for the empty blob. By understanding OCI artifacts and their role in representing container images, developers and DevOps teams can ensure the smooth deployment