Skip to content

Commit a3e6820

Browse files
Merge pull request #13428 from aweiteka/schema2
enable registry middleware acceptschema2
2 parents d1e5be5 + 304fba4 commit a3e6820

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

images/dockerregistry/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ middleware:
2727
repository:
2828
- name: openshift
2929
options:
30-
acceptschema2: false
30+
acceptschema2: true
3131
pullthrough: true
3232
mirrorpullthrough: true
3333
enforcequota: false

pkg/dockerregistry/server/repositorymiddleware.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ func newRepositoryWithClient(
170170
return nil, fmt.Errorf("%s is required", DockerRegistryURLEnvVar)
171171
}
172172

173-
acceptschema2, err := getBoolOption(AcceptSchema2EnvVar, "acceptschema2", false, options)
173+
acceptschema2, err := getBoolOption(AcceptSchema2EnvVar, "acceptschema2", true, options)
174174
if err != nil {
175175
context.GetLogger(ctx).Error(err)
176176
}

test/integration/dockerregistry_pullthrough_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ middleware:
5353
repository:
5454
- name: openshift
5555
options:
56-
acceptschema2: false
56+
acceptschema2: true
5757
pullthrough: true
5858
enforcequota: false
5959
projectcachettl: 1m

0 commit comments

Comments
 (0)