container-registry / helm-charts-oci-proxy

The Helm Charts OCI Proxy, will proxy and transform Helm Chart into OCI images on the fly. Address any Helm Chart as OCI image.
GNU Affero General Public License v3.0
95 stars 7 forks source link

Helm Chart.yaml Config and Provenance Layer are missing in returned Image Manifest #6

Open doughgle opened 11 months ago

doughgle commented 11 months ago

Thank you for the effort that goes into developing the Helm Chart OCI Proxy!

One observation is the Helm Chart OCI Proxy is missing the Helm Config (the contents of Chart.yaml) and the Helm Chart Provenance File as an Image Layer. It appears to only provide the tgz layer.

Expected Behaviour

If requested, the Helm Chart OCI Proxy returns an Image Manifest containing the application/vnd.cncf.helm.config.v1+json as Config and application/vnd.cncf.helm.chart.provenance.v1.prov as Chart Provenance File (if applicable).

Example: argo-helm/argo-cd

{
  "digest": "sha256:28b4cb53a4f188501779808f4cc40d71b7a51f7bfa39b8ac3ca9f6b523c1c198",
  "mediaType": "application/vnd.oci.image.manifest.v1+json",
  "size": 517,
  "config": {
    "digest": "sha256:314a3e90d13abcec860c3ddef751d7a915816d2e7b5a842540eb1e6f4f50cb36",
    "mediaType": "application/vnd.cncf.helm.config.v1+json",
    "size": 990
  },
  "layers": [
    {
      "digest": "sha256:4422d42afae57c4b7a4d006e132068fd2cf6debf008e48132df1c9582e161fd2",
      "mediaType": "application/vnd.cncf.helm.chart.content.v1.tar+gzip",
      "size": 148855
    },
    {
      "digest": "sha256:da669065e62499a6008e3c8c05e42128f163cce6a38144ef11a2456c5d0ac642",
      "mediaType": "application/vnd.cncf.helm.chart.provenance.v1.prov",
      "size": 1920
    },
    {
      "digest": "sha256:314a3e90d13abcec860c3ddef751d7a915816d2e7b5a842540eb1e6f4f50cb36",
      "mediaType": "application/octet-stream",
      "size": 990
    }
  ]
}

Actual Behaviour

If you query argo-helm/argo-cd an OCI chart manifest from the public chart proxy, the provenance image layer is absent and the config contents is '{}'

Failing Example:

curl https://chartproxy.container-registry.com/v2/argoproj.github.io/argo-helm/argo-cd/manifests/5.46.6 \
  --silent \
  --location \
  | jq
{
  "schemaVersion": 2,
  "mediaType": "application/vnd.oci.image.manifest.v1+json",
  "config": {
    "mediaType": "application/vnd.cncf.helm.config.v1+json",
    "digest": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
    "size": 2
  },
  "layers": [
    {
      "mediaType": "application/vnd.cncf.helm.chart.content.v1.tar+gzip",
      "digest": "sha256:4422d42afae57c4b7a4d006e132068fd2cf6debf008e48132df1c9582e161fd2",
      "size": 148855,
      "annotations": {
        "org.opencontainers.image.title": "argo-cd-5.46.6.tgz"
      }
    }
  ],
  "annotations": {
    "org.opencontainers.image.created": "2023-10-10T09:12:15Z"
  }
}
Vad1mo commented 11 months ago

Hello @doughgle this observation is correct. We aren't there yet, to support all features. We are, however, happy to accept contributions.