@ -110,7 +110,7 @@ func (cache *filesystemCache) ChartToLayers(ch *chart.Chart) ([]ocispec.Descript
if err != nil {
if err != nil {
return nil , err
return nil , err
}
}
metaLayer := cache . store . Add ( HelmChartMetaFileName , HelmChartMeta MediaType, metaJSONRaw )
metaLayer := cache . store . Add ( HelmChartMetaFileName , HelmChartMeta Layer MediaType, metaJSONRaw )
// Create content layer
// Create content layer
// TODO: something better than this hack. Currently needed for chartutil.Save()
// TODO: something better than this hack. Currently needed for chartutil.Save()
@ -131,7 +131,7 @@ func (cache *filesystemCache) ChartToLayers(ch *chart.Chart) ([]ocispec.Descript
if err != nil {
if err != nil {
return nil , err
return nil , err
}
}
contentLayer := cache . store . Add ( HelmChartContentFileName , HelmChartContent MediaType, contentRaw )
contentLayer := cache . store . Add ( HelmChartContentFileName , HelmChartContent Layer MediaType, contentRaw )
// Set annotations
// Set annotations
contentLayer . Annotations [ HelmChartNameAnnotation ] = name
contentLayer . Annotations [ HelmChartNameAnnotation ] = name
@ -149,14 +149,14 @@ func (cache *filesystemCache) LoadReference(ref *Reference) ([]ocispec.Descripto
if err != nil {
if err != nil {
return nil , err
return nil , err
}
}
metaLayer := cache . store . Add ( HelmChartMetaFileName , HelmChartMeta MediaType, metaJSONRaw )
metaLayer := cache . store . Add ( HelmChartMetaFileName , HelmChartMeta Layer MediaType, metaJSONRaw )
// add content layer
// add content layer
contentRaw , err := getSymlinkDestContent ( filepath . Join ( tagDir , "content" ) )
contentRaw , err := getSymlinkDestContent ( filepath . Join ( tagDir , "content" ) )
if err != nil {
if err != nil {
return nil , err
return nil , err
}
}
contentLayer := cache . store . Add ( HelmChartContentFileName , HelmChartContent MediaType, contentRaw )
contentLayer := cache . store . Add ( HelmChartContentFileName , HelmChartContent Layer MediaType, contentRaw )
// set annotations on content layer (chart name and version)
// set annotations on content layer (chart name and version)
err = setLayerAnnotationsFromChartLink ( contentLayer , filepath . Join ( tagDir , "chart" ) )
err = setLayerAnnotationsFromChartLink ( contentLayer , filepath . Join ( tagDir , "chart" ) )
@ -329,9 +329,9 @@ func extractLayers(layers []ocispec.Descriptor) (ocispec.Descriptor, ocispec.Des
for _ , layer := range layers {
for _ , layer := range layers {
switch layer . MediaType {
switch layer . MediaType {
case HelmChartMeta MediaType:
case HelmChartMeta Layer MediaType:
metaLayer = layer
metaLayer = layer
case HelmChartContent MediaType:
case HelmChartContent Layer MediaType:
contentLayer = layer
contentLayer = layer
}
}
}
}