Skip to content

Commit

Permalink
fix(bundle): allow application/vnd.cncf.helm.chart.content.v1.tar+gzi…
Browse files Browse the repository at this point in the history
…p media type (#6424)

Signed-off-by: Alexander Kozharsky <a.kozharsky@icloud.com>
  • Loading branch information
kozharskyad authored Nov 19, 2024
1 parent 0ced98a commit a8a03e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/deploy/bundles/registry/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (cache *Cache) FetchReference(ref *Reference) (*CacheRefSummary, error) {
var contentLayer *ocispec.Descriptor
for _, layer := range manifest.Layers {
layer := layer
if layer.MediaType == HelmChartContentLayerMediaType {
if layer.MediaType == HelmChartContentLayerMediaType || layer.MediaType == HelmChartContentLayerFullMediaType {
contentLayer = &layer
}
}
Expand Down
4 changes: 4 additions & 0 deletions pkg/deploy/bundles/registry/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@ const (

// HelmChartContentLayerMediaType is the reserved media type for Helm chart package content
HelmChartContentLayerMediaType = "application/tar+gzip"

// HelmChartContentLayerFullMediaType is the reserved media type for Helm chart package content, full variant
HelmChartContentLayerFullMediaType = "application/vnd.cncf.helm.chart.content.v1.tar+gzip"
)

// KnownMediaTypes returns a list of layer mediaTypes that the Helm client knows about
func KnownMediaTypes() []string {
return []string{
HelmChartConfigMediaType,
HelmChartContentLayerMediaType,
HelmChartContentLayerFullMediaType,
}
}

0 comments on commit a8a03e2

Please sign in to comment.