Merge pull request #6779 from jdolitsky/change-mediatype

fix(registry): change mediatype for chart content layer
pull/6785/head
Matthew Fisher 5 years ago committed by GitHub
commit d6f6184351
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -122,10 +122,14 @@ func (cache *Cache) FetchReference(ref *Reference) (*CacheRefSummary, error) {
contentLayer = &layer
}
}
if contentLayer.Size == 0 {
if contentLayer == nil {
return &r, errors.New(
fmt.Sprintf("manifest does not contain a layer with mediatype %s", HelmChartContentLayerMediaType))
}
if contentLayer.Size == 0 {
return &r, errors.New(
fmt.Sprintf("manifest layer with mediatype %s is of size 0", HelmChartContentLayerMediaType))
}
r.ContentLayer = contentLayer
info, err := cache.ociStore.Info(ctx(cache.out, cache.debug), contentLayer.Digest)
if err != nil {

@ -21,7 +21,7 @@ const (
HelmChartConfigMediaType = "application/vnd.cncf.helm.config.v1+json"
// HelmChartContentLayerMediaType is the reserved media type for Helm chart package content
HelmChartContentLayerMediaType = "application/vnd.cncf.helm.chart.content.layer.v1+tar"
HelmChartContentLayerMediaType = "application/tar+gzip"
)
// KnownMediaTypes returns a list of layer mediaTypes that the Helm client knows about

Loading…
Cancel
Save