Uploaded image for project: 'OpenShift Image Registry'
  1. OpenShift Image Registry
  2. IR-470

Drop virtualHostedStyle related commits from our fork

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • openshift-4.14, openshift-4.15, openshift-4.16
    • Registry
    • Proactive Architecture
    • 5
    • False
    • None
    • False

      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:

      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:

      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)

              Unassigned Unassigned
              fmissi Flavian Missi
              Wen Wang Wen Wang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: