-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Improve the airgap env preparation script [RHIDP-1442][RHIDP-4…
…415] (#705) * wip * Allow to mirror extra-images * Create IDMS on OCP and various fixes * Fix issue when pushing to the internal OCP registry Image names should follow this format: <project>/<name> * Update prepare-restricted-environment.sh script instead (in a backward compatible manner) * Default to installing the operator * Improve usage docs * Automatically detect and use the internal OCP registry unless --to-registry is set * Make sure the operand images can be pulles when using the internal OCP registry It works by adding the pull secrets to the namespace default service account. So it will only work when creating the CR in the operator namespace. Otherwise, we are displaying the instructions for different namespaces * Allow to use `oc-mirror` as tool for mirroring This is useful if users want to explicitly use `oc-mirror` as their tool of choice and they know they are already on OCP TBD: this currently does not work with the internal OCP registry when autodetected by the script * Fix an unbound variable issue * Fix unbound variable issue * Update docs * Use a temporary registry auth file for `skopeo` and `podman` Otherwise tools like 'skopeo login' will attempt to write to /run, which might be restricted in CI environments. This also ensures that the credentials don't conflict with any existing creds for the same registry. Co-authored-by: Zbynek Drapela <[email protected]> * Revert "Use a temporary registry auth file for `skopeo` and `podman`" This reverts commit c02beca. * Reapply "Use a temporary registry auth file for `skopeo` and `podman`" This reverts commit c6dc186. * Use a temporary registry auth file for `skopeo` and `podman` Otherwise tools like 'skopeo login' will attempt to write to /run, which might be restricted in CI environments. Since the user is required to be logged into the index image registry (and the target mirror registry eventually), it also makes sure these auth information are not lost when switching to a temporary auth file. * Disable redirects on the integrated OCP image registry Otherwise, as depicted in [1], this might cause some 403 errors to be returned to Skopeo. This fixes the behavior seen on the QE airgap bastion host. [1] https://access.redhat.com/solutions/6022011 * Fix registry auth creds loading oc-mirror v1 always loads the docker creds first [1]. But we want to use our own credentials file, which is not possible until oc-mirror v2 (currently tech preview). [1] https://github.com/openshift/oc-mirror/blob/main/pkg/image/credentials.go * Allow to filter all versions from the catalog By specifying `--filter-versions '*'` * Allow to override the path to the oc-mirror binary This adds a new option: --oc-mirror-path Might be useful when troubleshooting issues. * Provide hint to log into the OCP cluster when neither --to-registry nor --to-dir are specified * Fix issues with oc-mirror Because of targetCatalog in the ImageSet, the catalog image needs to exist in the target registry * Fix unbound variable issue * Append the default pull secrets in the catalog source manifest generated by oc-mirror * Remove note about oc-mirror limitation * Update docs * [oc-mirror] Fix target catalog image path in the registry when using the integrated OCP registry * Fix issues when mirroring with oc-mirror --------- Co-authored-by: Zbynek Drapela <[email protected]>
- Loading branch information
Showing
3 changed files
with
1,359 additions
and
357 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.