Skip to content

Commit 151263c

Browse files
authored
Merge pull request #103511 from xenolinux/oc-mir-host
[enterprise-4.16] OCPBUGS#63555: oc-mirror v2 requires explict registry hostnames
2 parents 51a03ad + 6f91fd9 commit 151263c

File tree

3 files changed

+31
-11
lines changed

3 files changed

+31
-11
lines changed

modules/oc-mirror-building-image-set-config-v2.adoc

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,31 @@ kind: ImageSetConfiguration
1515
apiVersion: mirror.openshift.io/v2alpha1
1616
mirror:
1717
platform:
18-
channels:
18+
channels: # <1>
1919
- name: stable-4.13
2020
minVersion: 4.13.10
2121
maxVersion: 4.13.10
22-
graph: true
22+
graph: true # <2>
2323
operators:
24-
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.15
25-
packages:
24+
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.15 # <3>
25+
packages: # <4>
2626
- name: aws-load-balancer-operator
2727
- name: 3scale-operator
2828
- name: node-observability-operator
29-
additionalImages:
29+
additionalImages: # <5>
3030
- name: registry.redhat.io/ubi8/ubi:latest
3131
- name: registry.redhat.io/ubi9/ubi@sha256:20f695d2a91352d4eaa25107535126727b5945bff38ed36a3e59590f495046f0
32-
----
32+
----
33+
<1> Set the channel to retrieve {product-title} images from.
34+
<2> Add `graph: true` to build and push the graph-data image to the mirror registry. The graph-data image is required to create OpenShift Update Service (OSUS). The `graph: true` field also generates the `UpdateService` custom resource manifest. The `oc` command-line interface (CLI) can use the `UpdateService` custom resource manifest to create OSUS. For more information, see _About the OpenShift Update Service_.
35+
<3> Set the Operator catalog to retrieve the {product-title} images from.
36+
<4> Specify only certain Operator packages to include in the image set. Remove this field to retrieve all packages in the catalog.
37+
<5> Specify any additional images to include in image set.
38+
+
39+
[NOTE]
40+
====
41+
In oc-mirror plugin v2, you must use explicit registry hostnames for all images listed under `additionalImages`. Otherwise, images are mirrored to incorrect target paths.
42+
====
43+
44+
// Are there more relevant example version numbers we can use in the example above?
45+
// Also, are there any other callouts that would be helpful for users here?

modules/oc-mirror-oci-format.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ mirror:
6767
<4> Optionally, specify an alternative namespace and name to mirror the catalog as.
6868
<5> Optionally, specify additional Operator catalogs to pull from a registry.
6969
<6> Optionally, specify additional images to pull from a registry.
70+
+
71+
[NOTE]
72+
====
73+
In oc-mirror plugin v2, you must use explicit registry hostnames for all images listed under `additionalImages`. Otherwise, images are mirrored to incorrect target paths.
74+
====
7075

7176
. Run the `oc mirror` command to mirror the OCI catalog to a target mirror registry:
7277
+

modules/oc-mirror-workflows-delete-v2.adoc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ kind: DeleteImageSetConfiguration
2626
delete:
2727
platform:
2828
channels:
29-
- name: stable-4.13
29+
- name: stable-4.13
3030
minVersion: 4.13.3
3131
maxVersion: 4.13.3
3232
operators:
@@ -35,23 +35,25 @@ delete:
3535
- name: aws-load-balancer-operator
3636
minVersion: 0.0.1
3737
maxVersion: 0.0.1
38-
additionalImages:
38+
additionalImages:
3939
- name: registry.redhat.io/ubi8/ubi@sha256:bce7e9f69fb7d4533447232478fd825811c760288f87a35699f9c8f030f2c1a6
4040
- name: registry.redhat.io/ubi8/ubi-minimal@sha256:8bedbe742f140108897fb3532068e8316900d9814f399d676ac78b46e740e34e
4141
----
4242

4343
[IMPORTANT]
4444
====
45-
Consider using the mirror-to-disk and disk-to-mirror workflows to reduce mirroring issues.
45+
* Consider using the mirror-to-disk and disk-to-mirror workflows to reduce deletion issues.
46+
47+
* In oc-mirror plugin v2, you must use explicit registry hostnames for all images listed under `additionalImages`. Otherwise, images are mirrored to incorrect target paths.
4648
====
4749

4850
In the image delete workflow, oc-mirror plugin v2 deletes only the manifests of the images, which does not reduce the storage occupied in the registry.
4951

50-
To free up storage space from unnecessary images, such as those with deleted manifests, you must enable the garbage collector on your container registry. With the garbage collector enabled, the registry will delete the image blobs that no longer have references to any manifests, thereby reducing the storage previously occupied by the deleted blobs. Enabling the garbage collector differs depending on your container registry.
52+
To free up storage space from unnecessary images, such as those with deleted manifests, you must enable the garbage collector on your container registry. With the garbage collector enabled, the registry will delete the image blobs that no longer have references to any manifests, thereby reducing the storage previously occupied by the deleted blobs. Enabling the garbage collector differs depending on your container registry.
5153

5254
[IMPORTANT]
5355
====
5456
To skip deleting the Operator catalog image when deleting images, you must list the specific Operators under the Operator catalog image in the `DeleteImageSetConfiguration` file. This ensures that only the specified Operators are deleted, not the catalog image.
5557
5658
If only the Operator catalog image is specified, all Operators within that catalog, as well as the catalog image itself, will be deleted.
57-
====
59+
====

0 commit comments

Comments
 (0)