appliance icon indicating copy to clipboard operation
appliance copied to clipboard

AGENT-1367: Use docker-registry from OCP release

Open rwsu opened this issue 5 months ago • 9 comments

Add support for using the docker-registry image from the OCP release instead of always building a generic registry internally. The implementation follows a priority-based approach for registry selection:

  1. User-configured imageRegistry.uri (highest priority)
  2. docker-registry from OCP release (middle priority)
  3. Internally built registry (fallback)

Changes:

  • Add ShouldUseOcpRegistry() helper function to centralize decision logic
  • Update CopyRegistryImageIfNeeded() to handle all three registry sources
  • Add start-registry.sh wrapper script to execute correct podman command
  • Update registry.env to include USE_OCP_REGISTRY flag
  • Modify ignition files to use ShouldUseOcpRegistry() helper
  • Always copy source images to localhost/registry:latest for disconnected env

The docker-registry image from OCP release requires different podman parameters (-u 0 --entrypoint=/usr/bin/distribution serve /etc/registry/config.yaml), which is handled by the wrapper script based on the USE_OCP_REGISTRY flag.

🤖 Generated with Claude Code

Assisted-by: Claude [email protected] Depends-on: https://github.com/openshift/image-registry/pull/450

rwsu avatar Nov 12 '25 23:11 rwsu

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

In response to this:

Add support for using the docker-registry image from the OCP release instead of always building a generic registry internally. The implementation follows a priority-based approach for registry selection:

  1. User-configured imageRegistry.uri (highest priority)
  2. docker-registry from OCP release (middle priority)
  3. Internally built registry (fallback)

Changes:

  • Add ShouldUseOcpRegistry() helper function to centralize decision logic
  • Update CopyRegistryImageIfNeeded() to handle all three registry sources
  • Add start-registry.sh wrapper script to execute correct podman command
  • Update registry.env to include USE_OCP_REGISTRY flag
  • Modify ignition files to use ShouldUseOcpRegistry() helper
  • Always copy source images to localhost/registry:latest for disconnected env

The docker-registry image from OCP release requires different podman parameters (-u 0 --entrypoint=/usr/bin/distribution serve /etc/registry/config.yaml), which is handled by the wrapper script based on the USE_OCP_REGISTRY flag.

🤖 Generated with Claude Code

Assisted-by: Claude [email protected]

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 avatar Nov 12 '25 23:11 openshift-ci-robot

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

In response to this:

Add support for using the docker-registry image from the OCP release instead of always building a generic registry internally. The implementation follows a priority-based approach for registry selection:

  1. User-configured imageRegistry.uri (highest priority)
  2. docker-registry from OCP release (middle priority)
  3. Internally built registry (fallback)

Changes:

  • Add ShouldUseOcpRegistry() helper function to centralize decision logic
  • Update CopyRegistryImageIfNeeded() to handle all three registry sources
  • Add start-registry.sh wrapper script to execute correct podman command
  • Update registry.env to include USE_OCP_REGISTRY flag
  • Modify ignition files to use ShouldUseOcpRegistry() helper
  • Always copy source images to localhost/registry:latest for disconnected env

The docker-registry image from OCP release requires different podman parameters (-u 0 --entrypoint=/usr/bin/distribution serve /etc/registry/config.yaml), which is handled by the wrapper script based on the USE_OCP_REGISTRY flag.

🤖 Generated with Claude Code

Assisted-by: Claude [email protected] Depends-on: https://github.com/openshift/image-registry/pull/450

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 avatar Nov 12 '25 23:11 openshift-ci-robot

/test e2e-compact-ipv4-static

rwsu avatar Nov 18 '25 15:11 rwsu

/retest-required

rwsu avatar Nov 20 '25 03:11 rwsu

@rwsu: This pull request references AGENT-1367 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 story to target the "4.21.0" version, but no target version was set.

In response to this:

Add support for using the docker-registry image from the OCP release instead of always building a generic registry internally. The implementation follows a priority-based approach for registry selection:

  1. User-configured imageRegistry.uri (highest priority)
  2. docker-registry from OCP release (middle priority)
  3. Internally built registry (fallback)

Changes:

  • Add ShouldUseOcpRegistry() helper function to centralize decision logic
  • Update CopyRegistryImageIfNeeded() to handle all three registry sources
  • Add start-registry.sh wrapper script to execute correct podman command
  • Update registry.env to include USE_OCP_REGISTRY flag
  • Modify ignition files to use ShouldUseOcpRegistry() helper
  • Always copy source images to localhost/registry:latest for disconnected env

The docker-registry image from OCP release requires different podman parameters (-u 0 --entrypoint=/usr/bin/distribution serve /etc/registry/config.yaml), which is handled by the wrapper script based on the USE_OCP_REGISTRY flag.

🤖 Generated with Claude Code

Assisted-by: Claude [email protected] Depends-on: https://github.com/openshift/image-registry/pull/450

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 avatar Nov 20 '25 04:11 openshift-ci-robot

/retest-required

rwsu avatar Nov 21 '25 20:11 rwsu

/retest

rwsu avatar Nov 21 '25 23:11 rwsu

/test e2e-compact-ipv4-static

rwsu avatar Dec 02 '25 21:12 rwsu

/retest-required

rwsu avatar Dec 05 '25 04:12 rwsu

/test e2e-compact-ipv4-static

rwsu avatar Dec 06 '25 03:12 rwsu

@rwsu: all tests passed!

Full PR test history. Your PR dashboard.

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.

openshift-ci[bot] avatar Dec 09 '25 20:12 openshift-ci[bot]

/approve /lgtm

danielerez avatar Dec 10 '25 10:12 danielerez

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danielerez, rwsu

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

The pull request process is described here

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[bot] avatar Dec 10 '25 10:12 openshift-ci[bot]