profile
viewpoint

Ask questionsOCI: Not able to push chart to <insert registry>

Output of helm version: version.BuildInfo{Version:"v3.0.0-alpha.1", GitCommit:"b9a54967f838723fe241172a6b94d18caf8bcdca", GitTreeState:"clean"}

~ $ helm create dummy-chart
Creating dummy-chart

~ $ helm chart save dummy-chart registry.hub.docker.com/karuppiah7890/dummy-chart
Using default tag: latest
Name: dummy-chart
Version: 0.1.0
Meta: sha256:42603b382336019d658ec8c0c71c57be421dc49a471ce6c6b776d7834e54cbec
Content: sha256:2b41efbc14985cd820ef48a2e898ac839559f6b77fd2a49af29dd7d6c4c3004c
latest: saved

~ $ helm chart push registry.hub.docker.com/karuppiah7890/dummy-chart
Using default tag: latest
The push refers to repository [registry.hub.docker.com/karuppiah7890/dummy-chart]
Name: dummy-chart
Version: 0.1.0
Meta: sha256:42603b382336019d658ec8c0c71c57be421dc49a471ce6c6b776d7834e54cbec
Content: sha256:2b41efbc14985cd820ef48a2e898ac839559f6b77fd2a49af29dd7d6c4c3004c
Error: failed commit on ref "manifest-sha256:febab107d93e89faa3926f875441334358562220d47d48230346e9b51fd46500": un
expected status: 400 Bad Request

When I tried to debug, the response from Docker Hub said -

{"errors":[{"code":"MANIFEST_INVALID","message":"manifest invalid","detail":{}}]}

and digging more, I saw that the manifest json looks like this -

{
    "schemaVersion": 2,
    "config": {
        "mediaType": "application/vnd.oci.image.config.v1+json",
        "digest": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
        "size": 2
    },
    "layers": [
        {
            "mediaType": "application/vnd.cncf.helm.chart.meta.v1+json",
            "digest": "sha256:42603b382336019d658ec8c0c71c57be421dc49a471ce6c6b776d7834e54cbec",
            "size": 106,
            "annotations": {
                "org.opencontainers.image.title": "chart-meta.json"
            }
        },
        {
            "mediaType": "application/vnd.cncf.helm.chart.content.v1+tar",
            "digest": "sha256:2b41efbc14985cd820ef48a2e898ac839559f6b77fd2a49af29dd7d6c4c3004c",
            "size": 2268,
            "annotations": {
                "org.opencontainers.image.title": "chart-content.tgz",
                "sh.helm.chart.name": "dummy-chart",
                "sh.helm.chart.version": "0.1.0"
            }
        }
    ]
}

and layers struct looks like this -

[{MediaType:application/vnd.cncf.helm.chart.meta.v1+json Digest:sha256:42603b382336019d658ec8c0c71c57be421dc49a471ce6c6b776d7834e54cbec Size:106 URLs:[] Annotations:map[org.opencontainers.image.title:chart-meta.json] Platform:<nil>} {MediaType:application/vnd.cncf.helm.chart.content.v1+tar Digest:sha256:2b41efbc14985cd820ef48a2e898ac839559f6b77fd2a49af29dd7d6c4c3004c Size:2268 URLs:[] Annotations:map[org.opencontainers.image.title:chart-content.tgz sh.helm.chart.name:dummy-chart sh.helm.chart.version:0.1.0] Platform:<nil>}]

And I tried the same by tagging the chart too, for example registry.hub.docker.com/karuppiah7890/dummy-chart:v1.0.0 and I still couldn't push the chart.

Docker Hub API is OCI Spec compliant right? Am I missing something here?

helm/helm

Answer questions karuppiah7890

Should I close this issue? Or keep it open to track whitelisting of Helm's media types ?

useful!

Related questions

Error: validation: chart.metadata is required when using --repo - helm hot 4
"Error: Transport is closing" message when attempting to install hot 2
Error: open .helm\repository\cache\local-index.yaml hot 2
"helm dep build" fails if requirements.yaml contains local dependencies and remote one hot 2
Helm upgrade fails the release after adding a new resource hot 2
Error: could not find a ready tiller pod hot 2
Error: apiVersion 'v2' is not valid. The value must be "v1" hot 2
Unable to start Tiller pod, bind address already in use hot 2
Upgrading releases with immutable resources (e.g. persitentVolume) hot 2
`helm upgrade --recreate-pods` flag should do a soft restart - helm hot 1
Helm3: No 'init', doesn't use existing ~/.helm hot 1
No kind Job is registered for version batch/v1 hot 1
`Error: rendered manifests contain a resource that already exists` but nothing shows up on `helm list --all` - helm hot 1
error calling eq: invalid type for comparison hot 1
upgrade apiVersion in k8s from 1.14 to 1.16 FAILED hot 1
Github User Rank List