distribution: remove unused RequireSchema2
It's never set, so we can remove it. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
8feeaecb84
commit
85fddc0081
3 changed files with 1 additions and 7 deletions
|
@ -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.
|
||||
|
|
|
@ -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" {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue