Skip to content

Conversation

@rwsu
Copy link
Contributor

@rwsu rwsu commented Dec 19, 2025

Add support for using pre-mirrored images (--mirror-path) and custom
registry certificates (--registry-cert) when building OVE ISOs. This
allows building ISOs in disconnected environments without requiring
oc-mirror to run during the build process.

Note: mirror-path and registry-cert options are only available when
using the script build method (build-ove-iso). The container build
method (build-ove-iso-container) does not support these options.

Changes to hack/build-ove-image.sh:

  • Add --mirror-path parameter to pass pre-mirrored images directory
  • Add --registry-cert parameter for custom registry certificates
  • Mount mirror path and certificate when running appliance container
  • Override entrypoint to install certificate before running appliance

Assisted-by: Claude Sonnet 4.5 noreply@anthropic.com

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 19, 2025
@openshift-ci
Copy link

openshift-ci bot commented Dec 19, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rwsu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 19, 2025
@rwsu rwsu changed the title WIP: Add mirror-path support for OVE ISO builder AGENT-1193: Add mirror-path and registry-cert support for OVE ISO builder Jan 13, 2026
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 13, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 13, 2026
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 13, 2026

@rwsu: This pull request references AGENT-1193 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.22.0" version, but no target version was set.

Details

In response to this:

  • Add --mirror-path flag to build-ove-image.sh and Makefile
  • Pass mirror-path to appliance builder to use pre-mirrored images

🤖 Generated with Claude Code

Assisted-by: Claude Sonnet 4.5 noreply@anthropic.com

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 13, 2026

@rwsu: This pull request references AGENT-1193 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Add support for using pre-mirrored images and custom registry certificates
when building OVE ISOs, enabling disconnected deployments with custom registries.

Changes for mirror-path:

  • Add --mirror-path parameter to build-ove-image.sh
  • Pass mirror path to both script and container build methods
  • Appliance skips oc-mirror and uses pre-mirrored images when provided

Changes for registry-cert:

  • Add --registry-cert parameter for custom registry TLS certificates
  • Mount certificate and run update-ca-trust in container
  • Override entrypoint with proper --dir assets to maintain compatibility
  • Support both script and container build methods

Assisted-by: Claude Sonnet 4.5 noreply@anthropic.com

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@rwsu
Copy link
Contributor Author

rwsu commented Jan 13, 2026

/cc @bfournie

@openshift-ci openshift-ci bot requested a review from bfournie January 13, 2026 23:16
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 15, 2026

@rwsu: This pull request references AGENT-1193 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Add support for using pre-mirrored images (--mirror-path) and custom
registry certificates (--registry-cert) when building OVE ISOs. This
allows building ISOs in disconnected environments without requiring
oc-mirror to run during the build process.

Note: mirror-path and registry-cert options are only available when
using the script build method (build-ove-iso). The container build
method (build-ove-iso-container) does not support these options.

Changes to hack/build-ove-image.sh:

  • Add --mirror-path parameter to pass pre-mirrored images directory
  • Add --registry-cert parameter for custom registry certificates
  • Mount mirror path and certificate when running appliance container
  • Override entrypoint to install certificate before running appliance

Assisted-by: Claude Sonnet 4.5 noreply@anthropic.com

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@rwsu rwsu force-pushed the AGENT-1193-v2 branch 2 times, most recently from 14e077e to 826641d Compare January 15, 2026 19:55
if [ ! -f "${appliance_work_dir}"/appliance.iso ]; then
local appliance_image=registry.ci.openshift.org/ocp/${major_minor_version}:agent-preinstall-image-builder
#local appliance_image=registry.ci.openshift.org/ocp/${major_minor_version}:agent-preinstall-image-builder
local appliance_image=quay.io/rwsu1/openshift-appliance:dev-scripts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just need to remove your local version before merge

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, will update.


build-ove-iso:
hack/build-ove-image.sh $(RELEASE_FLAG) $(RELEASE_VALUE) --pull-secret-file $(PULL_SECRET_FILE)
hack/build-ove-image.sh $(RELEASE_FLAG) $(RELEASE_VALUE) --pull-secret-file $(PULL_SECRET_FILE) $(if $(MIRROR_PATH),--mirror-path $(MIRROR_PATH)) $(if $(REGISTRY_CERT),--registry-cert $(REGISTRY_CERT))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wanted to confirm that this will also work if build-ove-iso-container is used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mirror-path will not be supported for build-ove-iso-container. The ability to use a an existing mirror output is intended for developers only. It gets more complicated if we need to support it for the container based builds and currently there isn't a use case for it.

…lder

Add support for using pre-mirrored images (--mirror-path) and custom
registry certificates (--registry-cert) when building OVE ISOs. This
allows building ISOs in disconnected environments without requiring
oc-mirror to run during the build process.

Note: mirror-path and registry-cert options are only available when
using the script build method (build-ove-iso). The container build
method (build-ove-iso-container) does not support these options.

Changes to hack/build-ove-image.sh:
- Add --mirror-path parameter to pass pre-mirrored images directory
- Add --registry-cert parameter for custom registry certificates
- Mount mirror path and certificate when running appliance container
- Override entrypoint to install certificate before running appliance

Assisted-by: Claude Sonnet 4.5 <noreply@anthropic.com>

if [[ -n "$MIRROR_PATH" ]]; then
cat << EOF >> ${cfg}
mirrorPath: /mirror
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andfasano I've added the mirrorPath as field to the appliance-config. Previously we also discussed how we can minimize the change to agent-installer-utils and one of the things we considered was to have dev-scripts add the mirrorPath to the appliance-config.yaml. That would eliminate the need to support a --mirror-path command line options. Unfortunately, that's currently not possible because build-ove-image.sh "all" step does two things in the same call/step: 1) configure the appliance-config.yaml and 2) call appliance build live-iso. To break this up to allow dev-scripts to manually updated the appliance-config.yaml, we would need to create a new build step which is currently missing. The "all" step is what is currently used. The "configure" and "create-iso" steps are used by the Dockerfile and internally it calls appliance to build the live ISO.

@openshift-ci
Copy link

openshift-ci bot commented Jan 23, 2026

@rwsu: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants