Skip to content

Use installer env var to disable image policy for mirrored non-GA releases#1865

Open
honza wants to merge 1 commit intoopenshift-metal3:masterfrom
honza:mirror-sig-policy
Open

Use installer env var to disable image policy for mirrored non-GA releases#1865
honza wants to merge 1 commit intoopenshift-metal3:masterfrom
honza:mirror-sig-policy

Conversation

@honza
Copy link
Member

@honza honza commented Mar 11, 2026

RHCOS ships a default policy.json that requires sigstoreSigned
verification for quay.io/openshift-release-dev images. When deploying
mirrored non-GA releases (nightly/CI), images are not signed, causing
pull failures for both MCD firstboot and CRI-O.

The installer supports OPENSHIFT_INSTALL_EXPERIMENTAL_DISABLE_IMAGE_POLICY
which adds a CVO override marking the ClusterImagePolicy as unmanaged.
This prevents MCO from rendering a restrictive policy.json on nodes.

Replace the previous MachineConfig-based workaround (permissive
policy.json file + machine-config-daemon-pull.service dropin) with
this single env var, set before openshift-install create manifests.

@openshift-ci openshift-ci bot requested review from celebdor and cybertron March 11, 2026 18:50
@openshift-ci
Copy link

openshift-ci bot commented Mar 11, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign cybertron for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@cybertron
Copy link
Contributor

I tried this locally and while it does fix the image pull problem, it also leaves MCO in a degraded state such that the deployment never officially completes. Maybe we need to talk to them about handling this, since they "own" this file?

@honza honza force-pushed the mirror-sig-policy branch from 8064430 to 0b523d1 Compare March 23, 2026 18:45
@honza
Copy link
Member Author

honza commented Mar 23, 2026

I just did a couple of loops with Claude and this new fix seems to work better. No MCO degradation.

For non-GA releases

RHCOS ships a default policy.json that requires sigstoreSigned
verification for quay.io/openshift-release-dev images. When deploying
mirrored non-GA releases (nightly/CI), images are not signed, causing
pull failures for both MCD firstboot and CRI-O.

The installer supports OPENSHIFT_INSTALL_EXPERIMENTAL_DISABLE_IMAGE_POLICY
which adds a CVO override marking the ClusterImagePolicy as unmanaged.
This prevents MCO from rendering a restrictive policy.json on nodes.

Replace the previous MachineConfig-based workaround (permissive
policy.json file + machine-config-daemon-pull.service dropin) with
this single env var, set before `openshift-install create manifests`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@honza honza force-pushed the mirror-sig-policy branch from 0b523d1 to 9c9b7df Compare March 24, 2026 21:24
@honza honza changed the title Fix MCD image pull failure with mirrored releases Use installer env var to disable image policy for mirrored non-GA releases Mar 24, 2026
@honza
Copy link
Member Author

honza commented Mar 24, 2026

Well, @zaneb revealed to me that there is a way to disable the verification in the installer. This is much simpler for CI.

@openshift-ci
Copy link

openshift-ci bot commented Mar 25, 2026

@honza: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-agent-compact-ipv4-iso-no-registry 9c9b7df link false /test e2e-agent-compact-ipv4-iso-no-registry
ci/prow/e2e-metal-ipi-ovn-dualstack 9c9b7df link false /test e2e-metal-ipi-ovn-dualstack

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.

# When mirroring non-GA releases, disable sigstore image policy verification.
# The installer adds a CVO override marking the ClusterImagePolicy as unmanaged,
# which prevents MCO from rendering a restrictive /etc/containers/policy.json.
if [[ ! -z "${MIRROR_IMAGES}" && "${MIRROR_IMAGES,,}" != "false" && "${OPENSHIFT_RELEASE_TYPE}" != "ga" ]]; then
Copy link
Member

Choose a reason for hiding this comment

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

Why only when mirroring? AIUI nightly releases in general are not signed and need the env var.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants