diff options
Diffstat (limited to 'distribution')
-rw-r--r-- | distribution/config.go | 2 | ||||
-rw-r--r-- | distribution/pull_v2.go | 4 | ||||
-rw-r--r-- | distribution/push_v2.go | 2 |
3 files changed, 1 insertions, 7 deletions
diff --git a/distribution/config.go b/distribution/config.go index 86c7ee1309..9dd6a5431d 100644 --- a/distribution/config.go +++ b/distribution/config.go @@ -46,8 +46,6 @@ type Config struct { // ReferenceStore manages tags. This value is optional, when excluded // content will not be tagged. ReferenceStore refstore.Store - // RequireSchema2 ensures that only schema2 manifests are used. - RequireSchema2 bool } // ImagePullConfig stores pull configuration. diff --git a/distribution/pull_v2.go b/distribution/pull_v2.go index 899ef09edb..0bef24d5f4 100644 --- a/distribution/pull_v2.go +++ b/distribution/pull_v2.go @@ -438,10 +438,6 @@ func (p *puller) pullTag(ctx context.Context, ref reference.Named, platform *spe switch v := manifest.(type) { case *schema1.SignedManifest: - if p.config.RequireSchema2 { - return false, fmt.Errorf("invalid manifest: not schema2") - } - // give registries time to upgrade to schema2 and only warn if we know a registry has been upgraded long time ago // TODO: condition to be removed if reference.Domain(ref) == "docker.io" { diff --git a/distribution/push_v2.go b/distribution/push_v2.go index 5c540c0c5b..4332c44480 100644 --- a/distribution/push_v2.go +++ b/distribution/push_v2.go @@ -188,7 +188,7 @@ func (p *pusher) pushTag(ctx context.Context, ref reference.NamedTagged, id dige putOptions := []distribution.ManifestServiceOption{distribution.WithTag(ref.Tag())} if _, err = manSvc.Put(ctx, manifest, putOptions...); err != nil { - if runtime.GOOS == "windows" || p.config.RequireSchema2 { + if runtime.GOOS == "windows" { logrus.Warnf("failed to upload schema2 manifest: %v", err) return err } |