|
5 | 5 |
|
6 | 6 | :_mod-docs-content-type: CONCEPT
|
7 | 7 | [id="oc-mirror-updating-registry-about_{context}"]
|
8 |
| -= About updating your mirror registry content |
| 8 | += Updating your mirror registry content |
9 | 9 |
|
10 |
| -When you run the oc-mirror plugin again, it generates an image set that only contains new and updated images since the previous execution. Because it only pulls in the differences since the previous image set was created, the generated image set is often smaller and faster to process than the initial image set. |
| 10 | +You can update your mirror registry content by updating the image set configuration file and mirroring the image set to the mirror registry. The next time that you run the oc-mirror plugin, an image set is generated that only contains new and updated images since the previous execution. |
11 | 11 |
|
12 |
| -[IMPORTANT] |
13 |
| -==== |
14 |
| -Generated image sets are sequential and must be pushed to the target mirror registry in order. You can derive the sequence number from the file name of the generated image set archive file. |
15 |
| -==== |
| 12 | +While updating the mirror registry, you must take into account the following considerations: |
16 | 13 |
|
17 |
| -[discrete] |
18 |
| -== Adding new and updated images |
| 14 | +* Images are pruned from the target mirror registry if they are no longer included in the latest image set that was generated and mirrored. Therefore, ensure that you are updating images for the same combination of the following key components so that only a differential image set is created and mirrored: |
19 | 15 |
|
20 |
| -Depending on the settings in your image set configuration, future executions of oc-mirror can mirror additional new and updated images. Review the settings in your image set configuration to ensure that you are retrieving new versions as necessary. For example, you can set the minimum and maximum versions of Operators to mirror if you want to restrict to specific versions. Alternatively, you can set the minimum version as a starting point to mirror, but keep the version range open so you keep receiving new Operator versions on future executions of oc-mirror. Omitting any minimum or maximum version gives you the full version history of an Operator in a channel. Omitting explicitly named channels gives you all releases in all channels of the specified Operator. Omitting any named Operator gives you the entire catalog of all Operators and all their versions ever released. |
| 16 | +** Image set configuration |
21 | 17 |
|
22 |
| -All these constraints and conditions are evaluated against the publicly released content by Red Hat on every invocation of oc-mirror. This way, it automatically picks up new releases and entirely new Operators. Constraints can be specified by only listing a desired set of Operators, which will not automatically add other newly released Operators into the mirror set. You can also specify a particular release channel, which limits mirroring to just this channel and not any new channels that have been added. This is important for Operator products, such as Red Hat Quay, that use different release channels for their minor releases. Lastly, you can specify a maximum version of a particular Operator, which causes the tool to only mirror the specified version range so that you do not automatically get any newer releases past the maximum version mirrored. In all these cases, you must update the image set configuration file to broaden the scope of the mirroring of Operators to get other Operators, new channels, and newer versions of Operators to be available in your target registry. |
| 18 | +** Destination registry |
23 | 19 |
|
24 |
| -It is recommended to align constraints like channel specification or version ranges with the release strategy that a particular Operator has chosen. For example, when the Operator uses a `stable` channel, you should restrict mirroring to that channel and potentially a minimum version to find the right balance between download volume and getting stable updates regularly. If the Operator chooses a release version channel scheme, for example `stable-3.7`, you should mirror all releases in that channel. This allows you to keep receiving patch versions of the Operator, for example `3.7.1`. You can also regularly adjust the image set configuration to add channels for new product releases, for example `stable-3.8`. |
| 20 | +** Storage configuration |
25 | 21 |
|
26 |
| -[discrete] |
27 |
| -== Pruning images |
| 22 | +* The images can be pruned in case of disk to mirror or mirror to mirror workflow. |
28 | 23 |
|
29 |
| -Images are pruned automatically from the target mirror registry if they are no longer included in the latest image set that was generated and mirrored. This allows you to easily manage and clean up unneeded content and reclaim storage resources. |
| 24 | +* The generated image sets must be pushed to the target mirror registry in sequence. You can derive the sequence number from the file name of the generated image set archive file. |
30 | 25 |
|
31 |
| -If there are {product-title} releases or Operator versions that you no longer need, you can modify your image set configuration to exclude them, and they will be pruned from the mirror registry upon mirroring. This can be done by adjusting a minimum or maximum version range setting per Operator in the image set configuration file or by deleting the Operator from the list of Operators to mirror from the catalog. You can also remove entire Operator catalogs or entire {product-title} releases from the configuration file. |
| 26 | +* Do not delete or modify the metadata image that is generated by the oc-mirror plugin. |
32 | 27 |
|
33 |
| -[IMPORTANT] |
34 |
| -==== |
35 |
| -If there are no new or updated images to mirror, the excluded images are not pruned from the target mirror registry. Additionally, if an Operator publisher removes an Operator version from a channel, the removed versions are pruned from the target mirror registry. |
36 |
| -==== |
| 28 | +* If you specified a top-level namespace for the mirror registry during the initial image set creation, then you must use this same namespace every time you run the oc-mirror plugin for the same mirror registry. |
37 | 29 |
|
38 |
| -To disable automatic pruning of images from the target mirror registry, pass the `--skip-pruning` flag to the `oc mirror` command. |
| 30 | +For more information about the workflow to update the mirror registry content, see the "High level workflow" section. |
0 commit comments