ARTIFACTORY: Helm OCI - Why does a chart contain more layers than listed in its manifest.json?
Helm OCI repositories are now supported starting with Artifactory version 7.75.3. When caching an OCI-based chart, similar to the structure of Docker images, we will see a manifest.json file along with the chart’s layers. For example:
Taking a look at the chart’s structure, the chart, in this example, appears to contain two layers. When observing its manifest.json file, the structure is as follows:
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"config": {
"mediaType": "application/vnd.cncf.helm.config.v1+json",
"digest": "sha256:df4e54dc651fed27f4f334c2ade271ca2c0712962814ee961291eedd290a1031",
"size": 1067
},
"layers": [
{
"mediaType": "application/vnd.cncf.helm.chart.content.v1.tar+gzip",
"digest": "sha256:7ab0833d994c537425e499a7872ef3d23c14957504ebadcd303812db8009b664",
"size": 86578,
"annotations": {
"org.opencontainers.image.title": "solr-8.3.1.tgz"
}
}
]
}
The manifest.json contains only one layer, whereas there are two listed in the UI. This is due to the way an OCI chart is structured. An OCI chart consists of 3 key resources:
- The packaged chart
- The provenance file (when included)
- An OCI image config containing the contents of the Chart.Yaml.
More information on the structure of OCI Artifacts can be found here .
The layer listed in the manifest file above is in fact the packaged chart. The additional layer (in some cases, layers) we see in the chart’s tree browser in the screenshot above (starting with sha “df4e5…”) is the chart’s Chart.Yaml file referenced in the manifest.json. The request Artifactory executes to get this file should look similar to this:
2024-01-01T11:46:16.097Z|29328ca05b671aba|dev-helmoci-remote||GET|/registry-v2/docker/registry/v2/blobs/sha256/df/df4e54dc651fed27f4f334c2ade271ca2c0712962814ee961291eedd290a1031/data?verify=1704112576-foTqB4U92vNKyJTR6AcvD6j7T6A%3D|200|0|1067|15