-
Task
-
Resolution: Unresolved
-
Normal
-
None
-
openshift-4.14, openshift-4.15, openshift-4.16
The .spec.storage.s3.virtualHostedStyle operator configuration tells the registry to use urls in the form of bucket-name.s3-endpoint.etc.
The upstream forcepathstyle setting was introduced to control the same behaviour, but it's named after the opposite setting (path style instead of virtual hosted style), i.e s3-endpoint.etc/bucket-name.
The PR that introduced virtual hosted style to upstream distribution was never merged: https://github.com/distribution/distribution/pull/3131/files and it's only present in our fork:
- https://github.com/openshift/docker-distribution/commit/e33e2357eb705f2ed7481e3510fceedb01a95bb6
- https://github.com/openshift/docker-distribution/commit/063574e3222f00556ec5113dddca9a0ac28ed4cb
The upstream introduction of the force path style config happened in: https://github.com/distribution/distribution/commit/15de9e21bad774b24e48a46d9238a5714e7ceb6c and it's also present in our fork.
We need to drop the following commits from openshift/docker-distribution during next rebase:
- https://github.com/openshift/docker-distribution/commit/e33e2357eb705f2ed7481e3510fceedb01a95bb6
- https://github.com/openshift/docker-distribution/commit/063574e3222f00556ec5113dddca9a0ac28ed4cb
OCPBUGS-32710 changes the operator so that it no longer relies on virtual hosted style config to configure the registry, instead it uses the upstream force path style config.
IMPORTANT OBSERVATIONS
Please note that openshift/docker-distribution implementation of virtual hosted style config was dependent on the region endpoint being set: https://github.com/openshift/docker-distribution/blob/6b2f5d2f1f432f14c7ea0b04f9c84a81ae9ef12e/registry/storage/driver/s3-aws/s3.go?plain=1#L548-L554
When we drop the commits that implement the virtual hosted style config in favor of force path style, this will no longer be the case: https://github.com/distribution/distribution/blob/e6d1d182bf002e9cb782e8a77493ccef0d716d2a/registry/storage/driver/s3-aws/s3.go?plain=1#L530-L534
We need to make sure we understand how this will affect our existing customers when they migrate - there might be a need to revisit the default value of the registry operator"virtualHostedStyle" config (which becomes force path style, as introduced by: https://github.com/openshift/cluster-image-registry-operator/pull/1028/files)
- relates to
-
OCPBUGS-32710 virtual hosted-style doesn't work since 4.14
- Closed