Change config media type

Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
pull/5945/head
Shiwei Zhang 6 years ago
parent cf90b5f9a2
commit 75b5b4934c

@ -97,7 +97,8 @@ func (c *Client) PushChart(ref *Reference) error {
if err != nil { if err != nil {
return err return err
} }
_, err = oras.Push(c.newContext(), c.resolver, ref.String(), c.cache.store, layers) pushOpt := oras.WithConfig(c.cache.store.Add("", HelmChartConfigMediaType, []byte("{}")))
_, err = oras.Push(c.newContext(), c.resolver, ref.String(), c.cache.store, layers, pushOpt)
if err != nil { if err != nil {
return err return err
} }

@ -20,6 +20,9 @@ const (
// HelmChartDefaultTag is the default tag used when storing a chart reference with no tag // HelmChartDefaultTag is the default tag used when storing a chart reference with no tag
HelmChartDefaultTag = "latest" HelmChartDefaultTag = "latest"
// HelmChartConfigMediaType is the reserved media type for Helm chart config
HelmChartConfigMediaType = "application/vnd.cncf.helm.config.v1+json"
// HelmChartMetaMediaType is the reserved media type for Helm chart metadata // HelmChartMetaMediaType is the reserved media type for Helm chart metadata
HelmChartMetaMediaType = "application/vnd.cncf.helm.chart.meta.v1+json" HelmChartMetaMediaType = "application/vnd.cncf.helm.chart.meta.v1+json"

Loading…
Cancel
Save